File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -235,32 +235,32 @@ Phaser.Utils = {
235235 * // => []
236236 */
237237 range : function ( start , end , step ) {
238- start = + start || 0 ;
239-
240- // enables use as a callback for functions like `_.map`
241- var type = typeof end ;
242- if ( ( type == 'number' || type == 'string' ) && step && step [ end ] === start ) {
243- end = step = null ;
244- }
245- step = step == null ? 1 : ( + step || 0 ) ;
246-
247- if ( end == null ) {
248- end = start ;
249- start = 0 ;
250- } else {
251- end = + end || 0 ;
252- }
253- // use `Array(length)` so engines like Chakra and V8 avoid slower modes
254- // http://youtu.be/XAqIpGU8ZZk#t=17m25s
255- var index = - 1 ,
256- length = Phaser . Math . max ( Phaser . Math . ceil ( ( end - start ) / ( step || 1 ) ) , 0 ) ,
257- result = Array ( length ) ;
258-
259- while ( ++ index < length ) {
260- result [ index ] = start ;
261- start += step ;
262- }
263- return result ;
238+ start = + start || 0 ;
239+
240+ // enables use as a callback for functions like `_.map`
241+ var type = typeof end ;
242+ if ( ( type == 'number' || type == 'string' ) && step && step [ end ] === start ) {
243+ end = step = null ;
244+ }
245+ step = step == null ? 1 : ( + step || 0 ) ;
246+
247+ if ( end == null ) {
248+ end = start ;
249+ start = 0 ;
250+ } else {
251+ end = + end || 0 ;
252+ }
253+ // use `Array(length)` so engines like Chakra and V8 avoid slower modes
254+ // http://youtu.be/XAqIpGU8ZZk#t=17m25s
255+ var index = - 1 ,
256+ length = Phaser . Math . max ( Phaser . Math . ceil ( ( end - start ) / ( step || 1 ) ) , 0 ) ,
257+ result = new Array ( length ) ;
258+
259+ while ( ++ index < length ) {
260+ result [ index ] = start ;
261+ start += step ;
262+ }
263+ return result ;
264264 } ,
265265
266266 /**
You can’t perform that action at this time.
0 commit comments