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/rect.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/rect.js')
| -rw-r--r-- | public/assets/javascripts/rectangles/models/rect.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/public/assets/javascripts/rectangles/models/rect.js b/public/assets/javascripts/rectangles/models/rect.js index ec32ab7..5952f6a 100644 --- a/public/assets/javascripts/rectangles/models/rect.js +++ b/public/assets/javascripts/rectangles/models/rect.js @@ -39,6 +39,10 @@ Rect.prototype.clone = function(){ return new Rect( this.x.clone(), this.y.clone() ) } + Rect.prototype.assign = function(r) { + this.x.assign(r.x) + this.y.assign(r.y) + } Rect.prototype.center = function(){ return new vec2(this.x.midpoint(), this.y.midpoint()) } |
