function
ClampLength(_min, _max)
Clamps the length of the vector between _min
and _max
and returns the result as a new vector.
Name | Type | Description |
---|---|---|
_min | Real |
The minimum length of the vector. |
_max | Real |
The maximum length of the vector. |
Struct.BBMOD_Vec4
The created vector.
new BBMOD_Vec4(3.0, 0.0, 0.0, 0.0).ClampLength(1.0, 5.0) // => BBMOD_Vec4(3.0, 0.0, 0.0, 0.0)
new BBMOD_Vec4(3.0, 0.0, 0.0, 0.0).ClampLength(4.0, 5.0) // => BBMOD_Vec4(4.0, 0.0, 0.0, 0.0)
new BBMOD_Vec4(3.0, 0.0, 0.0, 0.0).ClampLength(1.0, 2.0) // => BBMOD_Vec4(2.0, 0.0, 0.0, 0.0)
Copyright © 2022, BlueBurn. Built on May 18, 2022 using GMDoc.