js-util

Home > rc-js-util > Range2d > bound

Range2d.bound() method

Bound this range to the argument.

Signature:

bound(_boundTo: IReadonlyRange2d<TTypedArray>): void;

Parameters

Parameter Type Description
_boundTo IReadonlyRange2d<TTypedArray>  

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.