point2line
index
 
Name rotatedRight ( )
Description Returns a copy that has been rotated 90 degrees clockwise from the vector's forward angle. The magnitude is unchanged. This function is much faster than rotate() or setRotation().
Syntax
rotatedRight();
Returns a copy that has been rotated 90 degrees clockwise (Vect2)
Usage Web & Application
Related rotatedLeft ( )
rotateLeft ( )
rotateRight ( )
rotated ( )
rotate ( )
setRotation ( )
Examples
import point2line.*;

Vect2 velocity = new Vect2( 1, 0 );

println( degrees( velocity.angle() ) );  // prints "0.0"

Vect2 rightVelocity = velocity.rotatedRight();

println( degrees( rightVelocity.angle() ) );  // prints "90.0"