Reference+
Name
limit()
Class
PVector
Description
Limit the magnitude of this vector to the value used for the max parameter.
Examples
- PVector v = new PVector(10, 20, 2); v.limit(5); println(v); // Prints "[ 2.2271771, 4.4543543, 0.4454354 ]"
Syntax
- .limit(max)
Parameters
- max- (float)the maximum magnitude for the vector
Return
- PVector

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.