Add an is_smoothing() check
This commit is contained in:
parent
82dfee9313
commit
30609c3ecd
1 changed files with 6 additions and 0 deletions
|
@ -71,6 +71,12 @@ impl<T: Default> Smoother<T> {
|
||||||
pub fn none() -> Self {
|
pub fn none() -> Self {
|
||||||
Default::default()
|
Default::default()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Whether calling [next] will yield a new value or an old value. Useful if you need to
|
||||||
|
/// recompute something wheenver this parameter changes.
|
||||||
|
pub fn is_smoothing(&self) -> bool {
|
||||||
|
self.steps_left > 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// These are not iterators for the sole reason that this will always yield a value, and needing to
|
// These are not iterators for the sole reason that this will always yield a value, and needing to
|
||||||
|
|
Loading…
Add table
Reference in a new issue