mirror of
https://github.com/processing/processing4.git
synced 2026-01-27 18:31:07 +01:00
Refactoring unnecessary if statement.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user