Comparing version 1.0.8 to 1.0.9
{ | ||
"name": "wylib", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"description": "WyattERP Application Builder Library", | ||
@@ -5,0 +5,0 @@ "main": "dist/wylib-bundle.js", |
@@ -21,13 +21,21 @@ //Copyright WyattERP.org: See LICENSE in the root of this package | ||
add: function(v1, v2) { | ||
add: function(v1, ...args) { | ||
if (!('x' in v1 || 'y' in v1)) v1 = this.ptor(v1) //convert to rectangular? | ||
if (!('x' in v2 || 'y' in v2)) v2 = this.ptor(v2) | ||
return ({x: v1.x + v2.x, y: v1.y + v2.y}) | ||
args.forEach(v2=>{ | ||
if (!('x' in v2 || 'y' in v2)) v2 = this.ptor(v2) | ||
v1.x += v2.x | ||
v1.y += v2.y | ||
}) | ||
return (v1) | ||
}, | ||
sub: function(v1, v2) { | ||
sub: function(v1, ...args) { | ||
if (!('x' in v1 || 'y' in v1)) v1 = this.ptor(v1) //Convert to rectangular? | ||
args.forEach(v2=>{ | ||
if (!('x' in v2 || 'y' in v2)) v2 = this.ptor(v2) | ||
return ({x: v1.x - v2.x, y: v1.y - v2.y}) | ||
v1.x -= v2.x | ||
v1.y -= v2.y | ||
}) | ||
return (v1) | ||
} | ||
} |
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 too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
6127956
5255