@mborecki/geo2d
Advanced tools
| { | ||
| "name": "@mb-puzzle/vec2", | ||
| "version": "0.8.2", | ||
| "version": "0.9.0", | ||
| "private": true, | ||
@@ -5,0 +5,0 @@ "description": "", |
@@ -81,2 +81,8 @@ export interface Vec2ParsableObject { x: number, y: number } | ||
| sub(v: Vec2): Vec2 { | ||
| this.x -= v.x; | ||
| this.y -= v.y; | ||
| return this; | ||
| } | ||
| eq(v: Vec2): boolean { | ||
@@ -106,5 +112,9 @@ return this.x === v.x && this.y === v.y; | ||
| static add(v1: Vec2, v2: Vec2) { | ||
| static add(v1: Vec2, v2: Vec2): Vec2 { | ||
| return new Vec2(v1.x + v2.x, v1.y + v2.y); | ||
| } | ||
| static sub(v1: Vec2, v2: Vec2): Vec2 { | ||
| return new Vec2(v1.x - v2.x, v1.y - v2.y); | ||
| } | ||
| } |
+1
-1
| { | ||
| "name": "@mborecki/geo2d", | ||
| "version": "0.5.2", | ||
| "version": "0.6.0", | ||
| "description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.ts", |
11120
1.76%353
2.32%