ExpoDriveCurve
vectorlib::ExpoDriveCurve — fields, methods, parameters and return types.
pub struct ExpoDriveCurveLemLib's exponential drive curve. See <https://www.desmos.com/calculator/umicbymbnl>.
// deadband 3, minimum output 10, expo gain 1.019 — LemLib's example settings
let mut throttle = ExpoDriveCurve::new(3.0, 10.0, 1.019);
assert_eq!(throttle.curve(2.0), 0.0); // inside the deadband
assert!((throttle.curve(127.0) - 127.0).abs() < 1e-4);Methods
Prop
Type
new
pub const fn new(deadband: f32, min_output: f32, curve: f32) -> SelfConstruct a new expo drive curve.
deadband— range where input is considered to be 0min_output— the minimum output that can be returned (outside the deadband)curve— how "curved" the graph is
Parameters
Prop
Type
Returns
Self