Skip to main content

clock_position

Function clock_position 

Source
pub fn clock_position(relative_degrees: f32) -> u32
Expand description

Converts an angle relative to the player (0 = straight ahead) to a clock position, e.g. 90 degrees becomes 3 (o’clock). Returns 1..=12.