lineAngle method
Angle of the line from this point to o, relative to the X axis.
Equivalent to -atan2(dy, dx). Useful for screen-space direction.
Implementation
double lineAngle(V2 o) => -math.atan2(o.y - y, o.x - x);
Angle of the line from this point to o, relative to the X axis.
Equivalent to -atan2(dy, dx). Useful for screen-space direction.
double lineAngle(V2 o) => -math.atan2(o.y - y, o.x - x);