ReferenceScripting APIMotionMathsclamp
MotionMaths.clamp
methodA value kept within lo and hi.
| Name | clamp |
|---|---|
| Kind | method of MotionMaths |
| Called as | maths.clamp(…) |
| As a node | Clamp (logic graph) |
| Since | 0.4 |
Syntax
clamp( v: number, lo: number, hi: number): numberParameters
| Name | Type | Description |
|---|---|---|
v | number | The value |
lo | number | The lowest |
hi | number | The highest |
Returns
number: the value, within.
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.