Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 1.01 KB

decentraland-ecs.vector3.clamp.md

File metadata and controls

22 lines (15 loc) · 1.01 KB

Home > decentraland-ecs > Vector3 > Clamp

Vector3.Clamp method

Returns a new Vector3 set with the coordinates of "value", if the vector "value" is in the cube defined by the vectors "min" and "max" If a coordinate value of "value" is lower than one of the "min" coordinate, then this "value" coordinate is set with the "min" one If a coordinate value of "value" is greater than one of the "max" coordinate, then this "value" coordinate is set with the "max" one

Signature:

static Clamp(value: ReadOnlyVector3, min: ReadOnlyVector3, max: ReadOnlyVector3): Vector3;

Returns: Vector3

the new Vector3

Parameters

Parameter Type Description
value ReadOnlyVector3 defines the current value
min ReadOnlyVector3 defines the lower range value
max ReadOnlyVector3 defines the upper range value