Linear interpolation between two angles along the shorter arc
Parameters:
from
- angle in radians 0..2PI
to
- angle in radians 0..2PI
t
- interpolation ratio 0..1
var interpolateAngle = require('interpolate-angle');
interpolateAngle(0, 2 * Math.PI, 0.5) //-> PI
interpolateAngle(-Math.PI/6, Math.PI/6, 0.5) //-> 0
interpolateAngle(Math.PI*5/3, Math.PI/3, 0.25) //-> -1/6 PI
MIT, see LICENSE.md for details.