Files
to_docx/client/node_modules/d3-geo/src/projection/stereographic.js
T
Chen Xiao 0b64e2de94 First commit.
Signed-off-by: Chen Xiao <abigwc@gmail.com>
2026-05-08 14:43:16 +08:00

19 lines
445 B
JavaScript

import {atan, cos, sin} from "../math.js";
import {azimuthalInvert} from "./azimuthal.js";
import projection from "./index.js";
export function stereographicRaw(x, y) {
var cy = cos(y), k = 1 + cos(x) * cy;
return [cy * sin(x) / k, sin(y) / k];
}
stereographicRaw.invert = azimuthalInvert(function(z) {
return 2 * atan(z);
});
export default function() {
return projection(stereographicRaw)
.scale(250)
.clipAngle(142);
}