Refactoring unnecessary if statement.

This commit is contained in:
Yong Bakos
2013-02-21 18:55:09 -07:00
parent eff645ec3d
commit 80d417e4b2

View File

@@ -31,14 +31,10 @@ class Particle {
fill(255,lifespan);
ellipse(location.x,location.y,8,8);
}
// Is the particle still useful?
boolean isDead() {
if (lifespan < 0.0) {
return true;
} else {
return false;
}
return (lifespan < 0.0);
}
}
}