This commit is contained in:
Richard Davey 2013-05-23 21:47:29 +01:00
parent 94add2ea6e
commit 67bf221073
2 changed files with 26 additions and 1 deletions

View file

@ -177,6 +177,31 @@ module Phaser {
return this;
}
/**
* Multiply this vector by the given scalar.
*
* @param {number} scalar
* @return {Vector2} This for chaining.
*/
public mutableMultiplyByScalar(scalar: number): Vector2 {
this.x *= scalar;
this.y *= scalar;
return this;
}
/**
* Divide this vector by the given scalar.
*
* @param {number} scalar
* @return {Vector2} This for chaining.
*/
public mutableDivideByScalar(scalar: number): Vector2 {
this.x /= scalar;
this.y /= scalar;
return this;
}
/**
* Reverse this vector.
*

View file

@ -258,7 +258,7 @@ module Phaser {
this.isPlaying = false;
this.isFinished = true;
// callback
// callback goes here
}