point2line
index
 
Name setRotation ( )
Description Sets the rotation of the vector. All rotations are based on the unit circle where angle 0 and PI*2 is 3 o'clock. It is slightly faster to call rotate() by a delta angle.
Syntax
setRotation(angle);
Parameters
angle   in radians (float)
Returns None
Usage Web & Application
Related rotate ( )
Examples
import point2line.*;

Vect2 velocity = new Vect2( 0, 1 );

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

velocity.setRotation( radians( 270 ) );

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