diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-08-13 02:25:00 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-08-13 02:25:00 -0400 |
| commit | da43f90115048abffd2b427761185185088b2c48 (patch) | |
| tree | 3d85be32d6db28db087208e9033b92a87194529b /public/assets/javascripts/rectangles/models/vec2.js | |
| parent | f837f1af0033fd351474df3beeed4818b1859e5b (diff) | |
| parent | 5d1bb038332c540d8abe459092648a7b5ddfe734 (diff) | |
merge
Diffstat (limited to 'public/assets/javascripts/rectangles/models/vec2.js')
| -rw-r--r-- | public/assets/javascripts/rectangles/models/vec2.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/public/assets/javascripts/rectangles/models/vec2.js b/public/assets/javascripts/rectangles/models/vec2.js index 104c6f7..214feb9 100644 --- a/public/assets/javascripts/rectangles/models/vec2.js +++ b/public/assets/javascripts/rectangles/models/vec2.js @@ -17,6 +17,10 @@ vec2.prototype.clone = function(){ return new vec2(this.a, this.b) } + vec2.prototype.assign = function(v){ + this.a = v.a + this.b = v.b + } vec2.prototype.abs = function(){ if (this.b < this.a) { this.invert() |
