(pt: Point, rect: RectLike, out: Point)
| 199 | const tmpPt: number[] = []; |
| 200 | |
| 201 | function nearestPointOnRect(pt: Point, rect: RectLike, out: Point) { |
| 202 | const dist = projectPointToRect( |
| 203 | rect.x, rect.y, rect.width, rect.height, |
| 204 | pt.x, pt.y, tmpPt |
| 205 | ); |
| 206 | out.set(tmpPt[0], tmpPt[1]); |
| 207 | return dist; |
| 208 | } |
| 209 | /** |
| 210 | * Calculate min distance corresponding point. |
| 211 | * This method won't evaluate if point is in the path. |
no test coverage detected
searching dependent graphs…