Tangent.fromAngle constructor

  1. Offset position,
  2. double angle

Creates a Tangent based on the angle rather than the vector.

The vector is computed to be the unit vector at the given angle, interpreted as clockwise radians from the x axis.


factory Tangent.fromAngle(Offset position, double angle) {
  return Tangent(position, Offset(math.cos(angle), math.sin(angle)));