(lambda, phi)
| 10283 | } |
| 10284 | |
| 10285 | function centroidRingPoint(lambda, phi) { |
| 10286 | lambda *= radians, phi *= radians; |
| 10287 | var cosPhi = cos$1(phi), |
| 10288 | x = cosPhi * cos$1(lambda), |
| 10289 | y = cosPhi * sin$1(lambda), |
| 10290 | z = sin$1(phi), |
| 10291 | cx = y0$4 * z - z0 * y, |
| 10292 | cy = z0 * x - x0$4 * z, |
| 10293 | cz = x0$4 * y - y0$4 * x, |
| 10294 | m = hypot(cx, cy, cz), |
| 10295 | w = asin$1(m), // line weight = angle |
| 10296 | v = m && -w / m; // area weight multiplier |
| 10297 | X2$1.add(v * cx); |
| 10298 | Y2$1.add(v * cy); |
| 10299 | Z2$1.add(v * cz); |
| 10300 | W1 += w; |
| 10301 | X1$1 += w * (x0$4 + (x0$4 = x)); |
| 10302 | Y1$1 += w * (y0$4 + (y0$4 = y)); |
| 10303 | Z1$1 += w * (z0 + (z0 = z)); |
| 10304 | centroidPointCartesian(x0$4, y0$4, z0); |
| 10305 | } |
| 10306 | |
| 10307 | function centroid$1(object) { |
| 10308 | W0 = W1 = |
no test coverage detected