point2line
index
 
Name set ( )
Description Sets the vector by copying (no reference is kept).
Syntax
set(x, y);
set(v);
Parameters
x,y   components (float,float)
vector   to be copied into the vector (Vect2)
Returns None
Usage Web & Application
Related setZero ( )
Examples
import point2line.*;

Vect2 velocity = new Vect2( 1, 0 );

println( velocity );  // prints "Vect2( 1.0, 0.0 )"

velocity.set( 5, 5 );

println( velocity );  // prints "Vect2( 5.0, 5.0 )"

Vect2 newVelocity = new Vect2( 10, 10 );
velocity.set( newVelocity );

println( velocity );  // prints "Vect2( 10.0, 10.0 )"