daily pastebin goal
64%
SHARE
TWEET

Untitled

a guest Jun 19th, 2016 1 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. "use strict";
  2.  
  3. module.exports = class Rectangle {
  4.     constructor(x, y, width, height) {
  5.         this.x = x;
  6.         this.y = y;
  7.         this.width = width;
  8.         this.height = height;
  9.     }
  10.  
  11.     get left() {
  12.         return this.x;
  13.     }
  14.  
  15.     get right() {
  16.         return this.x + this.width;
  17.     }
  18.  
  19.     get top() {
  20.         return this.y;
  21.     }
  22.  
  23.     get bottom() {
  24.         return this.y + this.height;
  25.     }
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top