Skip to main content

should_trigger_callback

Function should_trigger_callback 

Source
pub fn should_trigger_callback(
    prev_ratio: Option<f64>,
    prev_is_intersecting: bool,
    current_ratio: f64,
    current_is_intersecting: bool,
    thresholds: &[f64],
) -> bool
Expand description

しきい値(thresholds)遷移判定 前回比率と今回比率の間で thresholds のいずれかを跨いだか、または初回かを判定