usestd::f32::consts::PI;useglam::Vec2;/// Round a number to the nearest even number
pubfnround_to_even(v: Vec2)-> Vec2{(v *0.5).round()*2.0}/// Rotate angle in radian
pubfnrot(mutang:f32, dt:f32)->f32{
ang += dt;while ang >PI{
ang -=2.0*PI;}while ang <-PI{
ang +=2.0*PI;}
ang
}