INNER CODE UNIT · Rust

f32

CleanCut/rusty_engine · src/lib.rs:101

pub const DOWN: f32 = PI + FRAC_PI_2;

// Compass directions
/// The rotation (in radians) for a sprite to face north
pub const NORTH: f32 = FRAC_PI_2;
/// The rotation (in radians) for a sprite to face north east
pub const NORTH_EAST: f32 = FRAC_PI_4;
/// The rotation (in radians) for a sprite to face east
pub const EAST: f32 = 0.0;
/// The rotation (in radians) for a sprite to face south east
pub const SOUTH_EAST: f32 = PI + FRAC_PI_2 + FRAC_PI_4;
/// The rotation (in radians) for a sprite to face south
pub const SOUTH: f32 = PI + FRAC_PI_2;
/// The rotation (in radians) for a sprite to face south west
pub const SOUTH_WEST: f32 = PI + FRAC_PI_4;
/// The rotation (in radians) for a sprite to face west
pub const WEST: f32 = PI;
/// The rotation (in radians) for a sprite to face north west

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…