@mathigon/euclid
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -1525,2 +1525,5 @@ var __defProp = Object.defineProperty; | ||
} | ||
padding(top, right, bottom, left) { | ||
return new Rectangle(this.p.shift(-left, -top), this.w + left + right, this.h + top + bottom); | ||
} | ||
contains(p, tolerance) { | ||
@@ -1527,0 +1530,0 @@ return (0, import_fermat10.isBetween)(p.x, this.p.x, this.p.x + this.w, tolerance) && (0, import_fermat10.isBetween)(p.y, this.p.y, this.p.y + this.h, tolerance); |
@@ -1461,2 +1461,5 @@ // src/angle.ts | ||
} | ||
padding(top, right, bottom, left) { | ||
return new Rectangle(this.p.shift(-left, -top), this.w + left + right, this.h + top + bottom); | ||
} | ||
contains(p, tolerance) { | ||
@@ -1463,0 +1466,0 @@ return isBetween3(p.x, this.p.x, this.p.x + this.w, tolerance) && isBetween3(p.y, this.p.y, this.p.y + this.h, tolerance); |
@@ -25,2 +25,3 @@ import { Line } from './line'; | ||
collision(r: Rectangle): boolean; | ||
padding(top: number, right: number, bottom: number, left: number): Rectangle; | ||
contains(p: Point, tolerance?: number): boolean; | ||
@@ -27,0 +28,0 @@ project(p: SimplePoint): Point; |
{ | ||
"name": "@mathigon/euclid", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "homepage": "https://mathigon.io/euclid", |
@@ -76,2 +76,6 @@ // ============================================================================= | ||
padding(top: number, right: number, bottom: number, left: number) { | ||
return new Rectangle(this.p.shift(-left, -top), this.w + left + right, this.h + top + bottom); | ||
} | ||
// --------------------------------------------------------------------------- | ||
@@ -78,0 +82,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
469328
6494