pub struct Minimum { /* private fields */ }
Expand description
Returns the lowest value in a given time frame.
§Parameters
- n - size of the time frame (integer greater than 0). Default value is 14.
§Example
use ta::indicators::Minimum;
use ta::{Calculate, Next};
let mut min = Minimum::new(3).unwrap();
assert_eq!(min.calc(10.0), 10.0);
assert_eq!(min.calc(11.0), 10.0);
assert_eq!(min.calc(12.0), 10.0);
assert_eq!(min.calc(13.0), 11.0);
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Minimum
impl RefUnwindSafe for Minimum
impl Send for Minimum
impl Sync for Minimum
impl Unpin for Minimum
impl UnwindSafe for Minimum
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more