diff options
| author | Julie Lala <jules@okfoc.us> | 2014-08-15 09:26:10 -0400 |
|---|---|---|
| committer | Julie Lala <jules@okfoc.us> | 2014-08-15 09:26:10 -0400 |
| commit | aecaf2de2b4ed5277b34e9209a0f31602e8a7999 (patch) | |
| tree | 78e46648032b91ebb0267e38f39f6227da7d8732 /public/assets/javascripts/rectangles/models/vec2.js | |
| parent | 02bde51c24ae1c6e189d031b80226e6a9f7cbc59 (diff) | |
| parent | 1be685f9fe4a7f3a3e947d45f865fe07c03ddbaf (diff) | |
Merge branch 'walls' of github.com:okfocus/vvalls into walls
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() |
