calculateAngularSpeed method
dynamic
calculateAngularSpeed(
- dynamic p0,
- dynamic p1,
- dynamic t0,
- dynamic t1,
- Calculate the angular speed
- @param {Number} p0 Position at t0
- @param {Number} p1 Position at t1
- @param {Number} t0 Initial time in milliseconds
- @param {Number} t1 Ending time in milliseconds
- @param {Number} p0 Position at t0
Implementation
calculateAngularSpeed(p0, p1, t0, t1) {
var s = p1 - p0;
var t = (t1 - t0) / 1000;
if (t == 0) {
return 0;
}
return s / t;
}