lineAngle method

double lineAngle(
  1. V2 o
)

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);