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
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:
parent
6113e93f2c
commit
bc5012c220
1 changed files with 4 additions and 4 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue