Skip to main content

pamoja_surge_update

Function pamoja_surge_update 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_surge_update( surge: *mut PamojaSurge, value: f32, out_delta: *mut f32, ) -> bool
Expand description

Feeds a value to a surge detector.

§Returns

true if the change since the previous reading went past the limit in the watched direction, having written its size, as a positive number, to out_delta; false otherwise, on the first reading, or if surge is null.

§Safety

surge must be a live handle from a surge constructor, or null, and out_delta must point to a writable float or be null.