atan2Degree function Utility

double atan2Degree(
  1. num a,
  2. num b
)

Calculates the angle in degrees for the point (b, a) using atan2(a, b).

  • a: The y-coordinate.
  • b: The x-coordinate.

Returns the angle in degrees.

Implementation

double atan2Degree(num a, num b) {
  return atan2(a, b) * (180 / pi);
}