Skip to content

Commit

Permalink
Converted max operation to an optimized ternary
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Thompson committed Jun 25, 2018
1 parent d4e371a commit f2dc6c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Emitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ export default class Emitter
if (this._emit)
{
//decrease spawn timer
this._spawnTimer -= Math.max(delta, 0);
this._spawnTimer -= delta < 0 ? 0 : delta;
//while _spawnTimer < 0, we have particles to spawn
while(this._spawnTimer <= 0)
{
Expand Down

0 comments on commit f2dc6c7

Please sign in to comment.