pub struct FloatingPointRange {
pub min: f64,
pub max: f64,
pub step: f64,
}Expand description
Describe a range of integer.
§Example
use safe_drive::{helper::Contains, parameter::FloatingPointRange};
let range = FloatingPointRange { min: -5.0, max: 10.0, step: 3.0 };
assert!(range.contains(-5.0));
assert!(range.contains(-2.0));
assert!(range.contains(10.0));
assert!(!range.contains(9.0));Fields§
§min: f64§max: f64§step: f64Trait Implementations§
Source§impl Contains for FloatingPointRange
impl Contains for FloatingPointRange
Source§impl Debug for FloatingPointRange
impl Debug for FloatingPointRange
Source§impl From<&FloatingPointRange> for FloatingPointRange
impl From<&FloatingPointRange> for FloatingPointRange
Source§fn from(range: &FloatingPointRange) -> Self
fn from(range: &FloatingPointRange) -> Self
Converts to this type from the input type.
Source§impl PartialEq for FloatingPointRange
impl PartialEq for FloatingPointRange
Source§impl PartialOrd for FloatingPointRange
impl PartialOrd for FloatingPointRange
impl StructuralPartialEq for FloatingPointRange
Auto Trait Implementations§
impl Freeze for FloatingPointRange
impl RefUnwindSafe for FloatingPointRange
impl Send for FloatingPointRange
impl Sync for FloatingPointRange
impl Unpin for FloatingPointRange
impl UnwindSafe for FloatingPointRange
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