Would it be possible + desirable to add the following method in the Vector3f class?
/**
* Truncates the vector's magnitude so that it does not exceed specified <code>max</code>.
*
* @param max the maximum magnitude of the vector.
*
* @return the truncated vector.
*/
public static Vector3f truncate(float max) {
if (length() > max) {
normalizeLocal().multLocal(max);
}
return this;
}