Skip to main content

half_value_layer

Function half_value_layer 

Source
pub fn half_value_layer(linear_attenuation_coefficient: f64) -> Option<f64>
Expand description

Computes half-value layer with HVL = ln(2) / mu.

ยงExamples

use use_radiation::half_value_layer;

let Some(value) = half_value_layer(core::f64::consts::LN_2) else {
    panic!("expected half-value layer");
};

assert!((value - 1.0).abs() < 1.0e-12);