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.
56 lines (27 loc) • 1.07 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [rc-js-util](./rc-js-util.md) > [Range2d](./rc-js-util.range2d.md) > [bound](./rc-js-util.range2d.bound.md)
## Range2d.bound() method
Bound this range to the argument.
**Signature:**
```typescript
bound(_boundTo: IReadonlyRange2d<TTypedArray>): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
\_boundTo
</td><td>
[IReadonlyRange2d](./rc-js-util.ireadonlyrange2d.md)<!-- --><[TTypedArray](./rc-js-util.ttypedarray.md)<!-- -->>
</td><td>
</td></tr>
</tbody></table>
**Returns:**
void
## Remarks
Where this range is larger than the bounding range, it will be resized to fit. Where this range is smaller than the bounding range but not contained, it will be moved maintaining its size. It Will be moved such that the the side furthest from the bounding range will be at the edge of the boundary.