point2line
index
 
Name normalize ( )
Description Normalizes the vector. Same as calling setMagnitude( 1 ).
Syntax
normalize();
Returns None
Usage Web & Application
Related normalized ( )
setMagnitude ( )
Examples
import point2line.*;

Vect2 velocity = new Vect2( 10, 10 );

println( velocity.magnitude() ); // prints "14.142136"

velocity.normalize();

println( velocity.magnitude() ); // prints "1.0"