point2line
index
 
Name clipped ( )
Description Returns a copy of the vector that has been clipped.
Syntax
clipped(maximum);
Parameters
maximum   magnitude (float)
Returns None
Usage Web & Application
Related clip ( )
setMagnitude ( )
Examples
import point2line.*;

Vect2 velocity = new Vect2( 10, 10 );

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

Vect2 clippedVelocity = velocity.clipped( 20 );

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

clippedVelocity = velocity.clipped( 5 );

println( clippedVelocity.magnitude() ); // prints "5.0"