[−][src]Struct k::joint::Range
min/max range to check the joint position
Fields
min: T
max: T
Methods
impl<T> Range<T> where
T: RealField,
[src]
T: RealField,
pub fn new(min: T, max: T) -> Self
[src]
pub fn is_valid(&self, val: T) -> bool
[src]
Check if the value is in the range
true
means it is OK.
If the val is the same as the limit value (min
or max
), it returns true (valid).
Examples
let range = k::joint::Range::new(-1.0, 1.0); assert!(range.is_valid(0.0)); assert!(range.is_valid(1.0)); assert!(!range.is_valid(1.5));
Trait Implementations
impl<T: Clone + RealField> Clone for Range<T>
[src]
impl<T: Copy + RealField> Copy for Range<T>
[src]
impl<T: Debug + RealField> Debug for Range<T>
[src]
impl<T> From<RangeInclusive<T>> for Range<T> where
T: RealField,
[src]
T: RealField,
fn from(range: RangeInclusive<T>) -> Self
[src]
Examples
let range : k::joint::Range<f64> = (-1.0..=1.0).into(); assert!(range.is_valid(0.0)); assert!(range.is_valid(1.0)); assert!(!range.is_valid(1.5));
Auto Trait Implementations
impl<T> RefUnwindSafe for Range<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Range<T>
impl<T> Sync for Range<T>
impl<T> Unpin for Range<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Range<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,