photonstorm/phaser — pull request #150 by beeglebug (2013-10-31 14:22:09+00:00)
Title: added getMagnitude, setMagnitude, normalize and isZero methods to Point

The magnitude and normalize functions are important for a lot of vector maths operations.

The isZero is more just a bit of sugar to avoid having to do:

if(point.x == 0 && point.y == 0) { /* do stuff */ }

or:

if(point.equals(new Phaser.Point)) { /* do stuff */ }