Returns the given number bound by min and/or max value.
If the value is not a valid number, then defaultValue is returned if given
(including if it is null), otherwise limits.min if given and not null,
otherwise limits.max if given and not null, or finally 0.
If the value is outside the bounds, then:
if defaultValue is given, defaultValue is returned (including if it
is null)
otherwise, the min or the max value (whichever one is violated) is
returned
Returns the given number bound by min and/or max value.
If the value is not a valid number, then
defaultValue
is returned if given (including if it is null), otherwiselimits.min
if given and not null, otherwiselimits.max
if given and not null, or finally 0.If the value is outside the bounds, then:
defaultValue
is given,defaultValue
is returned (including if it is null)