// ▄████████▄ + ███ + ▄█████████ ███ + // ███▀ ▀███ + + ███ ███▀ + ███ + + // ███ + ███ ███ ███ █████████ ███ ███ ███ ███ // ███ +███ ███ ███ ███ ███▐██████ ███ ███ ███ // ███ + ███ ███+ ███ +███ ███ + ███ ███ + ███ // ███▄ ▄███ ███▄ ███ ███ + ███ + ███ ███▄ ███ // ▀████████▀ + ▀███████ ███▄ ███▄ ▀████ ▀███████ // + + + ███ // + ▀████████████████████████████████████████████████████▀ // // Various common functions and constants use bevy::prelude::*; pub use bevy::math::{DVec3, DQuat}; pub use std::f32::consts::PI as PI32; pub use std::f64::consts::PI; pub const EPSILON32: f32 = 1e-9; pub const EPSILON: f64 = 1e-9; #[inline] pub fn bool2vis(boolean: bool) -> bevy::prelude::Visibility { if boolean { bevy::prelude::Visibility::Inherited } else { bevy::prelude::Visibility::Hidden } } #[inline] pub fn style_fullscreen() -> Style { Style { width: Val::Vw(100.0), height: Val::Vh(100.0), position_type: PositionType::Absolute, top: Val::Px(0.0), left: Val::Px(0.0), ..default() } } #[inline] pub fn style_centered() -> Style { Style { width: Val::Percent(100.0), height: Val::Percent(100.0), align_items: AlignItems::Center, justify_content: JustifyContent::SpaceAround, ..default() } }