New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@eturnity/eturnity_maths

Package Overview
Dependencies
Maintainers
5
Versions
434
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eturnity/eturnity_maths - npm Package Compare versions

Comparing version 6.37.0 to 6.38.0-EPDM-8453.0

2

package.json
{
"name": "@eturnity/eturnity_maths",
"version": "6.37.0",
"version": "6.38.0-EPDM-8453.0",
"author": "Eturnity Team",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -24,3 +24,3 @@ import {

let AD = getDistanceBetweenPoints(onPanelOutline[0], onPanelOutline[3])
let longEdgeLength = Math.max(AB, AD) + 100
let longEdgeLength = AB+AD
var concaveResult = concaveman(points, 1, longEdgeLength)

@@ -108,2 +108,10 @@ concaveResult.pop()

}
export function get3DDistanceBetweenPoints(firstPoint, secondPoint) {
const distance = Math.hypot(
firstPoint.x - secondPoint.x,
firstPoint.y - secondPoint.y,
firstPoint.z - secondPoint.z
)
return distance
}

@@ -110,0 +118,0 @@ export function getDegree(H, I, J) {

@@ -55,3 +55,3 @@ import { substractVector } from "./vector"

}
export function rotateTransformation(point,angle,center){
export function rotateTransformation(point,angle,center = {x:0,y:0}){
let rotationMatrix=[[Math.cos(angle),Math.sin(angle)],[-Math.sin(angle),Math.cos(angle)]]

@@ -58,0 +58,0 @@ let k=multiplyMatrices(rotationMatrix,[[point.x-center.x],[point.y-center.y]])

@@ -5,2 +5,4 @@

translate2D,
verticalProjectionOnPlane,
get3DDistanceBetweenPoints
} from '../geometry'

@@ -36,7 +38,17 @@ import { v4 as uuidv4 } from 'uuid'

let pxRadius = this.radius / canvasContext.mmPerPx
return Math.abs(getDistanceBetweenPoints(point, pxCenter) - pxRadius)
if(this.normalVector){
point.z=verticalProjectionOnPlane(point,this.normalVector,this.center).z
}else{
point.z=this.center.z
}
return Math.abs(get3DDistanceBetweenPoints(point, pxCenter) - pxRadius)
}
getProjectedPoint(point) {
let distance = getDistanceBetweenPoints(point, this.center)
if (distance == 0) {
if(this.normalVector){
point.z=verticalProjectionOnPlane(point,this.normalVector,this.center).z
}else{
point.z=this.center.z
}
let distance = get3DDistanceBetweenPoints(point, this.center)
if (distance == 0) {
console.error("can't project center to cercle", this)

@@ -43,0 +55,0 @@ return null

import {
getDistanceBetweenPoints,
get3DDistanceBetweenPoints,
getPointOnLine,

@@ -43,4 +44,4 @@ isSamePoint3D,

}
mmLength(canvasContext) {
return getDistanceBetweenPoints(this.outline[0], this.outline[1])
mmLength() {
return get3DDistanceBetweenPoints(this.outline[0], this.outline[1])
}

@@ -47,0 +48,0 @@

@@ -29,2 +29,3 @@

this.heightReference = 0
this.priority = 0
this.margins = {

@@ -31,0 +32,0 @@ isSameMargin: true,

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc