Methods
approximatelyEquals(a, b, epsilon) → {boolean}
Compare if two numbers are equal(if they have approximately the same value). to prevent js float precision issue
Adapted from glmatrix
Parameters:
| Name | Type | Description |
|---|---|---|
a |
number | |
b |
number | |
epsilon |
number | Precision to define proximity |
Returns:
check whether or not the arguments have approximately the same value
- Type
- boolean
findClosestPoint(sources, target)
Returns the closest source point to a target point
given an array of source points.
Parameters:
| Name | Type | Description |
|---|---|---|
sources |
An Array of source Points | |
target |
The target Point |
Returns:
Point The closest point from the points array