source: node_modules/d3-geo/src/projection/stereographic.js@ e4c61dd

Last change on this file since e4c61dd was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 6 months ago

Prototype 1.1

  • Property mode set to 100644
File size: 445 bytes
Line 
1import {atan, cos, sin} from "../math.js";
2import {azimuthalInvert} from "./azimuthal.js";
3import projection from "./index.js";
4
5export function stereographicRaw(x, y) {
6 var cy = cos(y), k = 1 + cos(x) * cy;
7 return [cy * sin(x) / k, sin(y) / k];
8}
9
10stereographicRaw.invert = azimuthalInvert(function(z) {
11 return 2 * atan(z);
12});
13
14export default function() {
15 return projection(stereographicRaw)
16 .scale(250)
17 .clipAngle(142);
18}
Note: See TracBrowser for help on using the repository browser.