@eturnity/eturnity_maths 1.0.10 → 1.0.11-EPDM-6432-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/geometry.js +9 -0
package/package.json
CHANGED
package/src/geometry.js
CHANGED
|
@@ -301,6 +301,15 @@ export function getDistanceBetweenPoints(firstPoint, secondPoint) {
|
|
|
301
301
|
)
|
|
302
302
|
}
|
|
303
303
|
|
|
304
|
+
export function polygonsHaveSame3DOutline(outline1, outline2) {
|
|
305
|
+
let sameLength = outline1.length == outline2.length
|
|
306
|
+
return (
|
|
307
|
+
sameLength &&
|
|
308
|
+
outline1.every((p) => outline2.find((v) => v.x == p.x && v.y == p.y)) &&
|
|
309
|
+
outline2.every((p) => outline1.find((v) => v.x == p.x && v.y == p.y))
|
|
310
|
+
)
|
|
311
|
+
}
|
|
312
|
+
|
|
304
313
|
export function isOnBorderOfPolygon(point, vs) {
|
|
305
314
|
let inside = false
|
|
306
315
|
for (let i = 0, j = vs.length - 1; i < vs.length; j = i++) {
|