Skip to main content

Module angle

Module angle 

Source
Expand description

Shared angle constants. Common angle constants.

Constants§

DEGREE_90
Degrees in a quarter turn.
DEGREE_180
Degrees in a half turn.
DEGREE_270
Degrees in three quarters of a turn.
DEGREE_360
Degrees in a full turn.
DEG_TO_RAD
Multiplier for converting f32 degrees to radians.
DEG_TO_RAD_F64
Multiplier for converting f64 degrees to radians.
RAD_TO_DEG
Multiplier for converting f32 radians to degrees.
RAD_TO_DEG_F64
Multiplier for converting f64 radians to degrees.

Functions§

convert_to_rotation_segment
Converts an angle in degrees to vanilla’s 16-segment rotation value.
wrap_degrees
Wraps an angle in degrees to vanilla’s [-180, 180) range.