Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- v *= b2Clamp(1.0f - h * b->m_linearDamping, 0.0f, 1.0f);
- #!/usr/bin/python
- v = 10
- step = 0
- h = 1/120.0
- time = 0.0
- while v > 1 :
- v *= ( 1 - h * 0.05 )
- step += 1
- time += h
- print( "step %d, time %f, v %f" % ( step, time, v ) )
- step 1, time 0.008333, v 9.995833
- ...
- step 5525, time 46.041667, v 1.000022
- step 5526, time 46.050000, v 0.999605
Add Comment
Please, Sign In to add comment