var BezierRotate = cc.CardinalSplineTo.extend(/** @lends cc.CardinalSplineBy# */{
	_startPosition:null,

	/**
	 * Constructor function, override it to extend the construction behavior, remember to call "this._super()" in the extended "ctor" function. <br />
	 * creates an action with a Cardinal Spline array of points and tension.
	 * @param {Number} duration
	 * @param {Array} points
	 * @param {Number} tension
	 */
	ctor:function (duration, points, tension) {
		cc.CardinalSplineTo.prototype.ctor.call(this);
		this._startPosition = cc.p(0, 0);

		tension !== undefined && this.initWithDuration(duration, points, tension);
	},

	update:function (dt) {
		dt = this._computeEaseTime(dt);
		var oldpos  = this.target.getPosition();
		cc.CardinalSplineTo.prototype.update.call(this,dt);
		var newpos  = this.target.getPosition();
		var angle = Math.atan2(-newpos.y + oldpos.y, newpos.x - oldpos.x) * 180 / Math.PI;
		this.target.setRotation(angle);
	}
	
});
