oop

Point

A Geometric point, with X and Y co-ordinates.


function Point( int_x, int_y ) {
  this.x = int_x;
  this.y = int_y;
}

Point.prototype.GetX = function() { return this.x; }

Point.prototype.GetY = function() { return this.y; }


Point.prototype.Set = function( int_x, int_y) {
  this.x = int_x;
  this.y = int_y;
};


Point.prototype.toPrintableString = function() {
  ans = '(' + this.GetX() + ',' + this.GetY() + ')';
  return ans;
};

Objects

Javascript Objects

Syndicate content