rc-js-util
Version:
A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.
72 lines (34 loc) • 919 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [rc-js-util](./rc-js-util.md) > [mathMin](./rc-js-util.mathmin.md)
## mathMin() function
Returns the smaller of the two parameters `a` and `b`<!-- -->.
**Signature:**
```typescript
export declare function mathMin(a: number, b: number): number;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
a
</td><td>
number
</td><td>
</td></tr>
<tr><td>
b
</td><td>
number
</td><td>
</td></tr>
</tbody></table>
**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()](./rc-js-util.mathmin.md)<!-- -->.