Function apply_falloff
Source pub fn apply_falloff(distance: f64, falloff: f64) -> f64
Expand description
Applies the inverse-square falloff formula
1.0 / (1.0 + falloff * d²), clamped to a non-negative result.
§Arguments
f64 - The distance from the light source. Negative values are
§Returns
f64 - A non-negative scalar in the range 0.0..=1.0.