| 11070 | // Generates a 4-bit vector representing the location of a point relative to |
| 11071 | // the small circle's bounding box. |
| 11072 | function code(lambda, phi) { |
| 11073 | var r = smallRadius ? radius : pi$1 - radius, |
| 11074 | code = 0; |
| 11075 | if (lambda < -r) code |= 1; // left |
| 11076 | else if (lambda > r) code |= 2; // right |
| 11077 | if (phi < -r) code |= 4; // below |
| 11078 | else if (phi > r) code |= 8; // above |
| 11079 | return code; |
| 11080 | } |
| 11081 | |
| 11082 | return clip(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-pi$1, radius - pi$1]); |
| 11083 | } |