The rotation methods take as a parameter a number representing an angle. To let you test the
methods taking an angle in radians, this page lets you input parameters as strings which are
evaluated with eval()
.
This way you can use a number or a valid javascript expression like Math.PI/3
as you
would in your code.
Then you can drag the vector to its initial position then click to see how the methods modify the vector.
v
v.rotateBy( )
v.rotateByDeg( )
v.rotateTo( )
v.rotateToDeg( )
v1
v2
v1.rotateTowards(v2, )
v.rotateTowardsDeg(v2, )