Guest User

Untitled

a guest
Jun 22nd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. v *= b2Clamp(1.0f - h * b->m_linearDamping, 0.0f, 1.0f);
  2.  
  3. #!/usr/bin/python
  4.  
  5. v = 10
  6. step = 0
  7. h = 1/120.0
  8. time = 0.0
  9.  
  10. while v > 1 :
  11. v *= ( 1 - h * 0.05 )
  12. step += 1
  13. time += h
  14. print( "step %d, time %f, v %f" % ( step, time, v ) )
  15.  
  16. step 1, time 0.008333, v 9.995833
  17. ...
  18. step 5525, time 46.041667, v 1.000022
  19. step 5526, time 46.050000, v 0.999605
Add Comment
Please, Sign In to add comment