Newer
Older
pixi.js / src / pixi / Point.js
@Mat Groves Mat Groves on 24 Feb 2013 727 bytes Documentation first draft
/**
 * @author Mat Groves http://matgroves.com/ @Doormat23
 */

/**
 * The Point object represents a location in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis.
 * @class Point
 * @constructor 
 * @param x {Number} position of the point
 * @param y {Number} position of the point
 */
PIXI.Point = function(x, y)
{
	/**
	 * @property x 
	 * @type Number
	 * @default 0
	 */
	this.x = x ? x : 0;
	
	/**
	 * @property y
	 * @type Number
	 * @default 0
	 */
	this.y = y ? y : 0;
}

/** 
 * @method clone
 * @return a copy of the point
 */
PIXI.Point.clone = function()
{
	return new PIXI.Point(this.x, this.y);
}

// constructor
PIXI.Point.constructor = PIXI.Point;