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.
54 lines (26 loc) • 842 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [rc-js-util](./rc-js-util.md) > [Vec2](./rc-js-util.vec2.md) > [bound2d](./rc-js-util.vec2.bound2d.md)
## Vec2.bound2d() method
If this point is outside of the range, set that dimension to the extrema of the range.
**Signature:**
```typescript
bound2d(_range: IReadonlyRange2d<TTypedArray>): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
\_range
</td><td>
[IReadonlyRange2d](./rc-js-util.ireadonlyrange2d.md)<!-- --><[TTypedArray](./rc-js-util.ttypedarray.md)<!-- -->>
</td><td>
The range to be bound to, inclusive.
</td></tr>
</tbody></table>
**Returns:**
void