Motion
Get Motion

ReferenceScripting APIMotionMathsclamp

MotionMaths.clamp

method

A value kept within lo and hi.

Nameclamp
Kindmethod of MotionMaths
Called asmaths.clamp(…)
As a nodeClamp (logic graph)
Since0.4

Syntax

clamp(    v: number,    lo: number,    hi: number): number

Parameters

NameTypeDescription
vnumberThe value
lonumberThe lowest
hinumberThe highest

Returns

number: the value, within.