@eturnity/eturnity_maths
Advanced tools
Comparing version 8.4.2 to 8.7.0-EPDM-12535.0
{ | ||
"name": "@eturnity/eturnity_maths", | ||
"version": "8.4.2", | ||
"version": "8.7.0-EPDM-12535.0", | ||
"author": "Eturnity Team", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -44,3 +44,7 @@ import { earthRadius } from './config' | ||
const deltaLng = tileLatLng.lng - lng | ||
let { x: x_mm, y: y_mm } = deltaLatLngToDistance(deltaLat, deltaLng, lat) | ||
let { x: x_mm, y: y_mm } = deltaLatLngToDistance( | ||
deltaLat, | ||
deltaLng, | ||
lat + deltaLat / 2 | ||
) | ||
let size = | ||
@@ -77,3 +81,3 @@ ((earthRadius * 2000 * Math.PI) / Math.pow(2.0, zoom)) * | ||
earthRadius / | ||
Math.cos((latitude * Math.PI) / 180) | ||
Math.cos(((latitude + lat / 2) * Math.PI) / 180) | ||
return { lat, lng } | ||
@@ -80,0 +84,0 @@ } |
@@ -737,2 +737,14 @@ import { mmTolerance, polygonCloseTolerance } from './config' | ||
} | ||
export function getNormalVectorFromFlatOutline(outline) { | ||
const ABC = get3pointNotAlignedFromOutline(outline) | ||
if (!ABC) { | ||
return null | ||
} | ||
let normalVector = getNormalVectorFrom3Points(...ABC) | ||
if (normalVector.z < 0) { | ||
normalVector = multiplyVector(-1, normalVector) | ||
} | ||
normalVector = normalizeVector(normalVector) | ||
return normalVector | ||
} | ||
export function getNormalVectortoEdgeTowardPolygon(k, outline) { | ||
@@ -739,0 +751,0 @@ const A = outline[k] |
@@ -12,2 +12,3 @@ export * from './coords' | ||
export * from './stats' | ||
export * from './irradiance' | ||
export * from './spherical' | ||
@@ -14,0 +15,0 @@ export * from './SHPSolver' |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
252140
65
8684
2