Skip to main content

Crate use_feedback

Crate use_feedback 

Source
Expand description

Primitive feedback loop helpers.

The crate intentionally keeps feedback logic explicit: a gain plus a simple positive or negative direction.

§Examples

use use_feedback::{negative_feedback, FeedbackDirection, FeedbackLoop};

let loop_gain = FeedbackLoop::new(0.5, FeedbackDirection::Negative).unwrap();
assert_eq!(loop_gain.apply(10.0, 2.0), 9.0);
assert_eq!(negative_feedback(10.0, 2.0, 0.5).unwrap(), 9.0);

Structs§

FeedbackLoop

Enums§

FeedbackDirection
FeedbackError

Functions§

negative_feedback
positive_feedback