Alvaro Cassinelli
/
skinGames_forktest
just a test
Fork of scoreLight_Advanced by
Diff: classPointMass.cpp
- Revision:
- 24:4e52031a495b
- Parent:
- 12:0de9cd2bced5
- Child:
- 30:d8af03f01cd4
diff -r bf666fcc61bc -r 4e52031a495b classPointMass.cpp --- a/classPointMass.cpp Wed Jun 13 10:09:41 2012 +0000 +++ b/classPointMass.cpp Mon Jun 18 08:00:57 2012 +0000 @@ -244,8 +244,8 @@ // Constrain speed to max speed (in norm): float normSpeed=getSpeed().length(); - if (normSpeed>100) { - setSpeed(getSpeed()*100.0/normSpeed); + if (normSpeed>MAX_PERMISSIBLE_SPEED) { + setSpeed(getSpeed()*1.0*MAX_PERMISSIBLE_SPEED/normSpeed); } }