<viz>.clamp

Return the value clamped between min and max

 

<viz>.clamp(
    value    
    min    
    max    

)

 

value

The value to clamp


min

The minimum value to return


max

The maximum value to return


Remarks

Returns the value supplied if between min and max. Returns min if the value is below min or max if the value is above max.

Return Value

Clamped value

Example

viz.clamp(.6, 0, 1)#Returns .6
viz.clamp(1.3, 0, 1)#Returns 1