* is pt (r,a) inside sector? * * @param {number} r : pt's radial coordinate * @param {number} a : pt's angular coordinate in *radians* * @param {2-item array} rBnds : sector's radial bounds * @param {2-item array} aBnds : sector's angular bounds in *radians* * @return {boolean}
(r, a, rBnds, aBnds)
| 87 | * @return {boolean} |
| 88 | */ |
| 89 | function isPtInsideSector(r, a, rBnds, aBnds) { |
| 90 | if(!isAngleInsideSector(a, aBnds)) return false; |
| 91 | |
| 92 | var r0, r1; |
| 93 | |
| 94 | if(rBnds[0] < rBnds[1]) { |
| 95 | r0 = rBnds[0]; |
| 96 | r1 = rBnds[1]; |
| 97 | } else { |
| 98 | r0 = rBnds[1]; |
| 99 | r1 = rBnds[0]; |
| 100 | } |
| 101 | |
| 102 | return r >= r0 && r <= r1; |
| 103 | } |
| 104 | |
| 105 | // common to pathArc, pathSector and pathAnnulus |
| 106 | function _path(r0, r1, a0, a1, cx, cy, isClosed) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…