diff --git a/src/gameplay_style.rs b/src/gameplay_style.rs index e3579ba..bd4b04a 100644 --- a/src/gameplay_style.rs +++ b/src/gameplay_style.rs @@ -70,11 +70,11 @@ impl JumpImpulse{ //height==-v.y*v.y/(2*g.y); //use energy to determine max height let gg=gravity.length_squared(); - let g:Planar64=gg.sqrt().fix(); + let g=gg.sqrt().fix_1(); let v_g=gravity.dot(velocity); //do it backwards - let radicand=v_g*v_g+(g*height*2).fix::>(); - velocity-(*gravity*(radicand.sqrt().fix::()+v_g)/gg).divide().map(|t|t.fix::()) + let radicand=v_g*v_g+(g*height*2).fix_4(); + velocity-(*gravity*(radicand.sqrt().fix_2()+v_g)/gg).divide().map(|t|t.fix_1()) }, &JumpImpulse::Linear(jump_speed)=>velocity+jump_dir.with_length(jump_speed), &JumpImpulse::Energy(energy)=>{