// Point2d.js

//  ----------------------------------------------------------------------------
//  <p>Title: Point2d</p>
//  <p>Description: </p>
//  <p>Copyright: Copyright (c) 2008</p>
//  <p>Company: Dr. Horst Walther</p>

//  ----------------------------------------------------------------------------
function Point2d (x, y) {
  this.x = x==undefined ? 0.0 : x;
  this.y = y==undefined ? 0.0 : y;

  this.get = function () {
    return new Point2d (this.x, this.y);
  }

  this.getX = function () {
    return x;
  }

  this.getY = function() {
    return y;
  }

  this.transform = function(p2d){
    return new Point2d (p2d.transformX(this.x), p2d.transformY(this.y));
  }

  this.toString = function(){
    return this.x+", "+this.y
  }
}

//  ----------------------------------------------------------------------------
