From 67bf2210732d83b8c438689eca9dc08385c4c832 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 23 May 2013 21:47:29 +0100 Subject: [PATCH] Updates --- Phaser/geom/Vector2.ts | 25 +++++++++++++++++++++++++ Phaser/system/animation/Animation.ts | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/Phaser/geom/Vector2.ts b/Phaser/geom/Vector2.ts index 91da7f43..51d94608 100644 --- a/Phaser/geom/Vector2.ts +++ b/Phaser/geom/Vector2.ts @@ -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. * diff --git a/Phaser/system/animation/Animation.ts b/Phaser/system/animation/Animation.ts index e24ac480..abb91319 100644 --- a/Phaser/system/animation/Animation.ts +++ b/Phaser/system/animation/Animation.ts @@ -258,7 +258,7 @@ module Phaser { this.isPlaying = false; this.isFinished = true; - // callback + // callback goes here }