StraightPathTransformation constructor

StraightPathTransformation({
  1. required double distance,
  2. double angle = 0,
})

Creates a StraightPathTransformation with the given distance and an optional angle. The angle parameter allows specifying the angle of the straight line in degrees. The distance parameter specifies how far the position moves along the straight line.

Implementation

StraightPathTransformation({required this.distance, double angle = 0})
    : _angleCos = cos(radians(angle)),
      _angleSin = sin(radians(angle));