This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dt = (1.0 / 60); | |
var damping = 0.5; | |
// Scale between Box2d physics and tagpro physics. | |
var scale = 100; | |
// Damping factor. | |
var d = 1 - damping * dt; | |
/** | |
* Get predicted velocity along one axis. | |
* @param {number} v0 - Initial velocity | |
* @param {number} a - Acceleration |