From 80d417e4b2f182bd41317dce57d924e3dfd19295 Mon Sep 17 00:00:00 2001 From: Yong Bakos Date: Thu, 21 Feb 2013 18:55:09 -0700 Subject: [PATCH] Refactoring unnecessary if statement. --- .../Simulate/MultipleParticleSystems/Particle.pde | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/java/examples/Topics/Simulate/MultipleParticleSystems/Particle.pde b/java/examples/Topics/Simulate/MultipleParticleSystems/Particle.pde index b519208ca..078ef23c5 100644 --- a/java/examples/Topics/Simulate/MultipleParticleSystems/Particle.pde +++ b/java/examples/Topics/Simulate/MultipleParticleSystems/Particle.pde @@ -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); } -} +}