@eturnity/eturnity_maths
Advanced tools
Comparing version 6.28.0-EPDM-7478.2 to 6.28.0-EPDM-7478.3
{ | ||
"name": "@eturnity/eturnity_maths", | ||
"version": "6.28.0-EPDM-7478.2", | ||
"version": "6.28.0-EPDM-7478.3", | ||
"author": "Eturnity Team", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -78,5 +78,4 @@ import { | ||
let angle = Math.round( | ||
(Math.acos((a * a + b * b - c * c) / (2 * a * b)) * 180) / Math.PI | ||
) | ||
let angle = (Math.acos((a * a + b * b - c * c) / (2 * a * b)) * 180) / Math.PI | ||
//if 3 points are aligned | ||
@@ -86,2 +85,5 @@ if (isNaN(angle)) { | ||
} | ||
let sgn=-Math.sign(crossProduct(substractVector(H,I),substractVector(J,I)).z) | ||
angle=sgn*angle | ||
return angle | ||
@@ -88,0 +90,0 @@ } |
@@ -57,4 +57,4 @@ import { substractVector } from "./vector" | ||
let rotationMatrix=[[Math.cos(angle),Math.sin(angle)],[-Math.sin(angle),Math.cos(angle)]] | ||
let k=multiplyMatrices(rotationMatrix,[point.x-center.x,point.y-center.y]) | ||
return {x:k[0]+center.x,y:k[1]+center.y} | ||
let k=multiplyMatrices(rotationMatrix,[[point.x-center.x],[point.y-center.y]]) | ||
return {x:k[0][0]+center.x,y:k[1][0]+center.y} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
97242