VapourCloud: drop the zero-lifetime guard saturate already covers
The mutation table let the guard's removal survive: with saturate's NaN rule (max(0, NaN) = 0) a zero-lifetime cloud has no opacity without it, and ACloudWithNoLifetimeObscuresNothing still pins that behaviour. Builds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
84f9cd39e5
commit
950b0e3ddc
1 changed files with 2 additions and 1 deletions
|
|
@ -16,8 +16,9 @@ public sealed class VapourCloud
|
|||
public float Opacity;
|
||||
public Entity Venter;
|
||||
|
||||
// A cloud with no lifetime divides by zero; saturate maps the NaN and the infinity to nothing left.
|
||||
public float OpacityAt(double now) =>
|
||||
Lifetime <= 0f ? 0f : saturate(Opacity) * saturate(1f - (float) (now - VentedAt) / Lifetime);
|
||||
saturate(Opacity) * saturate(1f - (float) (now - VentedAt) / Lifetime);
|
||||
|
||||
// Whether the segment a-b reaches the disc: the closest point of the segment to the centre lies within the
|
||||
// radius. A cloud past either end of the segment touches it only if it is near that end.
|
||||
|
|
|
|||
Loading…
Reference in a new issue