Namespace: Basic:max

Basic:max

Source:

Methods

max(value, maxValue) → {*}

Checks if a value is smaller than a maximum and returns the value or the upper bound respectively.

Accepts all values comparable with <.

Parameters:
Name Type Description
value *

the value to check

maxValue *

the upper bound

Source:
Returns:
value or maxValue
Type
*
Example
let croppedVal = max(value, 100);