pub fn parametric_decay(x: f32, params: &DecayParams) -> f32Expand description
Weibull survival function: S(x; τ, β) = exp(-ln(2) · (x/τ)^β)
Returns a value in [0.0, 1.0] representing the decay of a signal
at distance/time x from origin.
§Panics
Debug-asserts that params.half_life > 0 and params.shape > 0.
In release builds, invalid params produce NaN or 0.0.
§Properties
All properties below are verified by the property test suite:
- P1:
parametric_decay(0, _) == 1.0 - P2:
parametric_decay(τ, {τ, 1.0}) ≈ 0.5 - P3: Monotone decreasing in
x - P4: Output ∈
[0.0, 1.0] - P5: Approaches
0asx → ∞