File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -98,13 +98,14 @@ Phaser.Math = {
9898 */
9999 average : function ( ) {
100100
101- var sum = 0 ;
101+ var sum = 0 ,
102+ argumentsLength = arguments . length ;
102103
103- for ( var i = 0 ; i < arguments . length ; i ++ ) {
104+ for ( var i = 0 ; i < argumentsLength ; i ++ ) {
104105 sum += ( + arguments [ i ] ) ;
105106 }
106107
107- return sum / arguments . length ;
108+ return sum / argumentsLength ;
108109
109110 } ,
110111
@@ -146,7 +147,7 @@ Phaser.Math = {
146147 /**
147148 * Snap a value to nearest grid slice, using floor.
148149 *
149- * Example: if you have an interval gap of 5 and a position of 12... you will snap to 10.
150+ * Example: if you have an interval gap of 5 and a position of 12... you will snap to 10.
150151 * As will 14 snap to 10... but 16 will snap to 15.
151152 *
152153 * @method Phaser.Math#snapToFloor
You can’t perform that action at this time.
0 commit comments