js-util

Home > rc-js-util > mathMin

mathMin() function

Returns the smaller of the two parameters a and b.

Signature:

export declare function mathMin(a: number, b: number): number;

Parameters

Parameter Type Description
a number  
b number  

Returns:

number

Remarks

NaN comparison will cause a debug error. Differs from Math.min by taking only 2 arguments, avoids overhead of handling variable number of arguments.

See mathMin().