Skip to main content

remaining_quantity_from_decay_constant

Function remaining_quantity_from_decay_constant 

pub fn remaining_quantity_from_decay_constant(
    initial_quantity: f64,
    decay_constant: f64,
    time: f64,
) -> Option<f64>
Expand description

Computes the remaining quantity from an initial quantity, decay constant, and elapsed time.

Formula: N = N0 * exp(-lambda * t).