fix
Some checks failed
CI / testing (macos-latest) (push) Has been cancelled
CI / testing (ubuntu-latest) (push) Has been cancelled
CI / testing (windows-latest) (push) Has been cancelled
CI / linting (macos-latest) (push) Has been cancelled
CI / linting (ubuntu-latest) (push) Has been cancelled
CI / linting (windows-latest) (push) Has been cancelled
CI / Documentation (push) Has been cancelled
CI / coverage (ubuntu-latest) (push) Has been cancelled

This commit is contained in:
Joeri Exelmans 2025-11-04 10:57:27 +01:00
parent 6113e93f2c
commit bc5012c220

View file

@ -33,12 +33,12 @@ impl<T: Clone> InterpolationMethod<T> for Constant {
/// If the signal does not have a value at a given point, a fixed value is returned
pub struct DefaultFalse;
impl<bool> InterpolationMethod<bool> for DefaultFalse {
impl InterpolationMethod<bool> for DefaultFalse {
fn at(a: &Sample<bool>, b: &Sample<bool>, time: Duration) -> Option<bool> {
if time == b.time {
Some(b.value.clone())
} else if a.time <= time && time < b.time {
Some(a.value.clone())
Some(b.value)
} else if time == a.time {
Some(a.value)
} else {
Some(false)
}