MCPcopy Create free account
hub / github.com/breck7/scroll / code

Function code

external/.d3.js:11072–11080  ·  view source on GitHub ↗
(lambda, phi)

Source from the content-addressed store, hash-verified

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}

Callers 1

clipLineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected