NuclearDispersionSystem/ant-design-vue-jeecg/node_modules/d3-geo-projection/src/cylindricalStereographic.js

22 lines
475 B
JavaScript
Raw Normal View History

2023-09-14 14:47:11 +08:00
import {atan, cos, tan} from "./math";
import parallel1 from "./parallel1";
export function cylindricalStereographicRaw(phi0) {
var cosPhi0 = cos(phi0);
function forward(lambda, phi) {
return [lambda * cosPhi0, (1 + cosPhi0) * tan(phi / 2)];
}
forward.invert = function(x, y) {
return [x / cosPhi0, atan(y / (1 + cosPhi0)) * 2];
};
return forward;
}
export default function() {
return parallel1(cylindricalStereographicRaw)
.scale(124.75);
}