Skip to content

Commit 689501c

Browse files
committed
Phaser.Point.angleSq removed. It didn't work so any code relying on it would be broken, and it's unclear what it was meant for (thanks @nextht phaserjs#1396)
1 parent fc63d0a commit 689501c

3 files changed

Lines changed: 3 additions & 29 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ Version 2.2.2 - "Alkindar" - in development
9393
* Particles.Arcade.Emitter.makeParticles now checks the given `quantity` value against `Emitter.maxParticles`. If `quantity` is more than `maxParticles` then the `maxParticles` value is reset to the new `quantity` given (as this is how most devs seem to use it).
9494
* Particles.Arcade.Emitter.emitParticle now returns a boolean depending if a particle was emitted or not.
9595
* Particles.Arcade.Emitter.update only updates `_counter` if a particle was successfully emitted.
96+
* Phaser.Point.angleSq removed. It didn't work so any code relying on it would be broken, and it's unclear what it was meant for (thanks @nextht #1396)
9697

9798
### Bug Fixes
9899

src/geom/Point.js

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -295,19 +295,6 @@ Phaser.Point.prototype = {
295295

296296
},
297297

298-
/**
299-
* Returns the angle squared between this Point object and another object with public x and y properties.
300-
*
301-
* @method Phaser.Point#angleSq
302-
* @param {Phaser.Point|any} a - The object to get the angleSq from this Point to.
303-
* @return {number} The angleSq between the two objects.
304-
*/
305-
angleSq: function (a) {
306-
307-
return this.subtract(a).angle(a.subtract(this));
308-
309-
},
310-
311298
/**
312299
* Rotates this Point around the x/y coordinates given to the desired angle.
313300
*
@@ -604,20 +591,6 @@ Phaser.Point.angle = function (a, b) {
604591

605592
};
606593

607-
/**
608-
* Returns the angle squared between two Point objects.
609-
*
610-
* @method Phaser.Point.angleSq
611-
* @param {Phaser.Point} a - The first Point object.
612-
* @param {Phaser.Point} b - The second Point object.
613-
* @return {number} The angle squared between the two Points.
614-
*/
615-
Phaser.Point.angleSq = function (a, b) {
616-
617-
return a.subtract(b).angle(b.subtract(a));
618-
619-
};
620-
621594
/**
622595
* Creates a negative Point.
623596
*
@@ -703,7 +676,7 @@ Phaser.Point.rperp = function (a, out) {
703676
};
704677

705678
/**
706-
* Returns the distance of this Point object to the given object (can be a Circle, Point or anything with x/y properties).
679+
* Returns the euclidian distance of this Point object to the given object (can be a Circle, Point or anything with x/y properties).
707680
*
708681
* @method Phaser.Point.distance
709682
* @param {object} a - The target object. Must have visible x and y properties that represent the center of the object.

src/math/Math.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ Phaser.Math = {
10751075
},
10761076

10771077
/**
1078-
* Returns the distance between the two given set of coordinates.
1078+
* Returns the euclidian distance between the two given set of coordinates.
10791079
*
10801080
* @method Phaser.Math#distance
10811081
* @param {number} x1

0 commit comments

Comments
 (0)