Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mathigon/euclid

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mathigon/euclid - npm Package Compare versions

Comparing version 1.1.8 to 1.1.9

2

dist/index.esm.js

@@ -2048,3 +2048,3 @@ // src/angle.ts

scale(sx, sy = sx) {
return new Ellipse(this.c, this.a * sx, this.b * sy, this.angle);
return new Ellipse(this.c.scale(sx, sy), this.a * sx, this.b * sy, this.angle);
}

@@ -2051,0 +2051,0 @@ shift(x, y = x) {

{
"name": "@mathigon/euclid",
"version": "1.1.8",
"version": "1.1.9",
"license": "MIT",

@@ -35,11 +35,11 @@ "homepage": "https://mathigon.io/euclid",

"dependencies": {
"@mathigon/core": "1.1.5",
"@mathigon/fermat": "1.1.5"
"@mathigon/core": "1.1.6",
"@mathigon/fermat": "1.1.6"
},
"devDependencies": {
"@types/tape": "4.13.2",
"@typescript-eslint/eslint-plugin": "5.50.0",
"@typescript-eslint/parser": "5.50.0",
"esbuild": "0.17.5",
"eslint": "8.33.0",
"@typescript-eslint/eslint-plugin": "5.54.0",
"@typescript-eslint/parser": "5.54.0",
"esbuild": "0.17.10",
"eslint": "8.35.0",
"eslint-plugin-import": "2.27.5",

@@ -46,0 +46,0 @@ "tape": "5.6.3",

@@ -129,3 +129,3 @@ // =============================================================================

scale(sx: number, sy = sx) {
return new Ellipse(this.c, this.a * sx, this.b * sy, this.angle);
return new Ellipse(this.c.scale(sx, sy), this.a * sx, this.b * sy, this.angle);
}

@@ -132,0 +132,0 @@

@@ -31,6 +31,7 @@ // =============================================================================

tape('scale', (test) => {
const ellipse = new Ellipse(ORIGIN, 2, 1);
const ellipse = new Ellipse(new Point(1, 1), 2, 1);
const scaled = ellipse.scale(2);
test.true(scaled.f1.equals(new Point(-Math.sqrt(3) * 2, 0)));
test.true(scaled.f2.equals(new Point(Math.sqrt(3) * 2, 0)));
test.true(scaled.f1.equals(new Point(2 - Math.sqrt(12), 2)));
test.true(scaled.f2.equals(new Point(2 + Math.sqrt(12), 2)));
test.true(scaled.c.equals(new Point(2, 2)));
test.end();

@@ -37,0 +38,0 @@ });

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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