vec3ClampLength
vec3ClampLength(
v,max):Vec3
Defined in: src/modules/math/vec3.ts:32
v clamped to at most max in length, direction preserved — the spherical
bounds test. Returns v itself when it is already short enough, and
{0, 0, 0} for a non-positive max: a negative length budget means “no
length allowed”, not “reverse the direction”.
Parameters
Section titled “Parameters”number