Skip to main content

Module atan2

Module atan2 

Source
Expand description

Implementations of Atan2 and Atan2Assign, traits for computing the angle of a point given by two Float coordinates.

Functionsยง

primitive_float_atan2
Computes $\operatorname{atan2}(y,x)$, the angle of the point $(x,y)$ measured from the positive $x$-axis, for primitive floats.
primitive_float_atan2_pi
Computes $\operatorname{atan2}(y,x)/\pi$, the angle of the point $(x,y)$ measured from the positive $x$-axis in half-turns, for primitive floats.
primitive_float_atan2_pi_rational
Computes $\operatorname{atan2}(y,x)/\pi$, the angle of the point $(x,y)$ measured from the positive $x$-axis in half-turns, for Rationals, returning the result as a primitive float.
primitive_float_atan2_rational
Computes $\operatorname{atan2}(y,x)$, the angle of the point $(x,y)$ measured from the positive $x$-axis, for Rationals, returning the result as a primitive float.
primitive_float_atan2_with_period
Computes $\operatorname{atan2}(y,x)u/(2\pi)$, the angle of the point $(x,y)$ measured from the positive $x$-axis in $u$ths of a turn (so that u = 360 gives degrees), for primitive floats.
primitive_float_atan2_with_period_rational
Computes $\operatorname{atan2}(y,x)u/(2\pi)$, the angle of the point $(x,y)$ measured from the positive $x$-axis in $u$ths of a turn (so that u = 360 gives degrees), for Rationals, returning the result as a primitive float.