Trait rin::math::One[][src]

pub trait One: Mul<Self, Output = Self> {
    pub fn one() -> Self;

    pub fn set_one(&mut self) { ... }
pub fn is_one(&self) -> bool
    where
        Self: PartialEq<Self>
, { ... } }

Defines a multiplicative identity element for Self.

Laws

a * 1 = a       ∀ a ∈ Self
1 * a = a       ∀ a ∈ Self

Required methods

pub fn one() -> Self[src]

Returns the multiplicative identity element of Self, 1.

Purity

This function should return the same result at all times regardless of external mutable state, for example values stored in TLS or in static muts.

Loading content...

Provided methods

pub fn set_one(&mut self)[src]

Sets self to the multiplicative identity element of Self, 1.

pub fn is_one(&self) -> bool where
    Self: PartialEq<Self>, 
[src]

Returns true if self is equal to the multiplicative identity.

For performance reasons, it’s best to implement this manually. After a semver bump, this method will be required, and the where Self: PartialEq bound will be removed.

Loading content...

Implementations on Foreign Types

impl One for u8[src]

impl One for f32[src]

impl One for u128[src]

impl One for u32[src]

impl One for i64[src]

impl One for i16[src]

impl One for i8[src]

impl One for usize[src]

impl One for f64[src]

impl One for i32[src]

impl<T> One for Wrapping<T> where
    T: One,
    Wrapping<T>: Mul<Wrapping<T>>,
    <Wrapping<T> as Mul<Wrapping<T>>>::Output == Wrapping<T>, 
[src]

impl One for isize[src]

impl One for u16[src]

impl One for i128[src]

impl One for u64[src]

impl<T> One for Ratio<T> where
    T: Clone + Integer
[src]

impl One for AutoSimd<[u64; 4]>[src]

impl One for AutoSimd<[u32; 16]>[src]

impl One for AutoSimd<[i128; 4]>[src]

impl One for AutoSimd<[i64; 2]>[src]

impl One for AutoSimd<[i8; 32]>[src]

impl One for AutoSimd<[isize; 2]>[src]

impl One for AutoSimd<[u16; 2]>[src]

impl One for AutoSimd<[u8; 4]>[src]

impl One for AutoSimd<[usize; 4]>[src]

impl One for AutoSimd<[f64; 8]>[src]

impl One for AutoSimd<[usize; 2]>[src]

impl One for AutoSimd<[i64; 8]>[src]

impl One for AutoSimd<[i32; 4]>[src]

impl One for AutoSimd<[i128; 2]>[src]

impl One for AutoSimd<[u128; 4]>[src]

impl One for AutoSimd<[f64; 4]>[src]

impl One for AutoSimd<[i16; 16]>[src]

impl One for AutoSimd<[u8; 2]>[src]

impl One for AutoSimd<[u8; 16]>[src]

impl One for AutoSimd<[u32; 4]>[src]

impl One for AutoSimd<[i8; 4]>[src]

impl One for AutoSimd<[u16; 8]>[src]

impl One for AutoSimd<[i8; 16]>[src]

impl One for AutoSimd<[u16; 32]>[src]

impl One for AutoSimd<[f64; 2]>[src]

impl One for AutoSimd<[u128; 2]>[src]

impl One for AutoSimd<[i32; 2]>[src]

impl One for AutoSimd<[u8; 8]>[src]

impl One for AutoSimd<[i32; 8]>[src]

impl One for AutoSimd<[u64; 8]>[src]

impl One for AutoSimd<[u64; 2]>[src]

impl One for AutoSimd<[f32; 16]>[src]

impl One for AutoSimd<[i16; 8]>[src]

impl One for AutoSimd<[i128; 1]>[src]

impl One for AutoSimd<[u32; 8]>[src]

impl One for AutoSimd<[usize; 8]>[src]

impl One for AutoSimd<[i32; 16]>[src]

impl One for AutoSimd<[i8; 2]>[src]

impl One for AutoSimd<[u8; 32]>[src]

impl One for AutoSimd<[i8; 8]>[src]

impl One for AutoSimd<[i16; 4]>[src]

impl One for AutoSimd<[isize; 4]>[src]

impl One for AutoSimd<[i16; 32]>[src]

impl One for AutoSimd<[f32; 8]>[src]

impl One for AutoSimd<[u128; 1]>[src]

impl One for AutoSimd<[f32; 4]>[src]

impl One for AutoSimd<[u16; 4]>[src]

impl One for AutoSimd<[u16; 16]>[src]

impl One for AutoSimd<[i64; 4]>[src]

impl One for AutoSimd<[u32; 2]>[src]

impl One for AutoSimd<[isize; 8]>[src]

impl One for AutoSimd<[i16; 2]>[src]

impl One for AutoSimd<[f32; 2]>[src]

impl<T> One for Complex<T> where
    T: Clone + Num
[src]

impl<N> One for Dual<Quaternion<N>> where
    N: SimdRealField,
    <N as SimdValue>::Element: SimdRealField
[src]

Loading content...

Implementors

impl One for Node[src]

impl One for rin::math::simd::AutoSimd<[f32; 2]>[src]

impl One for rin::math::simd::AutoSimd<[f32; 4]>[src]

impl One for rin::math::simd::AutoSimd<[f32; 8]>[src]

impl One for rin::math::simd::AutoSimd<[f32; 16]>[src]

impl One for rin::math::simd::AutoSimd<[f64; 2]>[src]

impl One for rin::math::simd::AutoSimd<[f64; 4]>[src]

impl One for rin::math::simd::AutoSimd<[f64; 8]>[src]

impl One for rin::math::simd::AutoSimd<[i8; 2]>[src]

impl One for rin::math::simd::AutoSimd<[i8; 4]>[src]

impl One for rin::math::simd::AutoSimd<[i8; 8]>[src]

impl One for rin::math::simd::AutoSimd<[i8; 16]>[src]

impl One for rin::math::simd::AutoSimd<[i8; 32]>[src]

impl One for rin::math::simd::AutoSimd<[i16; 2]>[src]

impl One for rin::math::simd::AutoSimd<[i16; 4]>[src]

impl One for rin::math::simd::AutoSimd<[i16; 8]>[src]

impl One for rin::math::simd::AutoSimd<[i16; 16]>[src]

impl One for rin::math::simd::AutoSimd<[i16; 32]>[src]

impl One for rin::math::simd::AutoSimd<[i32; 2]>[src]

impl One for rin::math::simd::AutoSimd<[i32; 4]>[src]

impl One for rin::math::simd::AutoSimd<[i32; 8]>[src]

impl One for rin::math::simd::AutoSimd<[i32; 16]>[src]

impl One for rin::math::simd::AutoSimd<[i64; 2]>[src]

impl One for rin::math::simd::AutoSimd<[i64; 4]>[src]

impl One for rin::math::simd::AutoSimd<[i64; 8]>[src]

impl One for rin::math::simd::AutoSimd<[i128; 1]>[src]

impl One for rin::math::simd::AutoSimd<[i128; 2]>[src]

impl One for rin::math::simd::AutoSimd<[i128; 4]>[src]

impl One for rin::math::simd::AutoSimd<[isize; 2]>[src]

impl One for rin::math::simd::AutoSimd<[isize; 4]>[src]

impl One for rin::math::simd::AutoSimd<[isize; 8]>[src]

impl One for rin::math::simd::AutoSimd<[u8; 2]>[src]

impl One for rin::math::simd::AutoSimd<[u8; 4]>[src]

impl One for rin::math::simd::AutoSimd<[u8; 8]>[src]

impl One for rin::math::simd::AutoSimd<[u8; 16]>[src]

impl One for rin::math::simd::AutoSimd<[u8; 32]>[src]

impl One for rin::math::simd::AutoSimd<[u16; 2]>[src]

impl One for rin::math::simd::AutoSimd<[u16; 4]>[src]

impl One for rin::math::simd::AutoSimd<[u16; 8]>[src]

impl One for rin::math::simd::AutoSimd<[u16; 16]>[src]

impl One for rin::math::simd::AutoSimd<[u16; 32]>[src]

impl One for rin::math::simd::AutoSimd<[u32; 2]>[src]

impl One for rin::math::simd::AutoSimd<[u32; 4]>[src]

impl One for rin::math::simd::AutoSimd<[u32; 8]>[src]

impl One for rin::math::simd::AutoSimd<[u32; 16]>[src]

impl One for rin::math::simd::AutoSimd<[u64; 2]>[src]

impl One for rin::math::simd::AutoSimd<[u64; 4]>[src]

impl One for rin::math::simd::AutoSimd<[u64; 8]>[src]

impl One for rin::math::simd::AutoSimd<[u128; 1]>[src]

impl One for rin::math::simd::AutoSimd<[u128; 2]>[src]

impl One for rin::math::simd::AutoSimd<[u128; 4]>[src]

impl One for rin::math::simd::AutoSimd<[usize; 2]>[src]

impl One for rin::math::simd::AutoSimd<[usize; 4]>[src]

impl One for rin::math::simd::AutoSimd<[usize; 8]>[src]

impl<N> One for Quaternion<N> where
    N: SimdRealField,
    <N as SimdValue>::Element: SimdRealField
[src]

impl<N> One for Unit<Complex<N>> where
    N: SimdRealField,
    <N as SimdValue>::Element: SimdRealField
[src]

impl<N> One for Unit<Quaternion<N>> where
    N: SimdRealField,
    <N as SimdValue>::Element: SimdRealField
[src]

impl<N, D> One for Matrix<N, D, D, <DefaultAllocator as Allocator<N, D, D>>::Buffer> where
    N: Scalar + Zero + One + ClosedMul<N> + ClosedAdd<N>,
    D: DimName,
    DefaultAllocator: Allocator<N, D, D>, 
[src]

impl<N, D> One for Rotation<N, D> where
    N: Scalar + Zero + One + ClosedAdd<N> + ClosedMul<N>,
    D: DimName,
    DefaultAllocator: Allocator<N, D, D>, 
[src]

impl<N, D> One for Translation<N, D> where
    N: Scalar + Zero + ClosedAdd<N>,
    D: DimName,
    DefaultAllocator: Allocator<N, D, U1>, 
[src]

impl<N, D, C> One for Transform<N, D, C> where
    C: TCategory,
    N: RealField,
    D: DimNameAdd<U1>,
    DefaultAllocator: Allocator<N, <D as DimNameAdd<U1>>::Output, <D as DimNameAdd<U1>>::Output>, 
[src]

pub fn one() -> Transform<N, D, C>[src]

Creates a new identity transform.

impl<N, D, R> One for Isometry<N, D, R> where
    N: SimdRealField,
    D: DimName,
    R: AbstractRotation<N, D>,
    <N as SimdValue>::Element: SimdRealField,
    DefaultAllocator: Allocator<N, D, U1>, 
[src]

pub fn one() -> Isometry<N, D, R>[src]

Creates a new identity isometry.

impl<N, D, R> One for Similarity<N, D, R> where
    N: SimdRealField,
    D: DimName,
    R: AbstractRotation<N, D>,
    <N as SimdValue>::Element: SimdRealField,
    DefaultAllocator: Allocator<N, D, U1>, 
[src]

pub fn one() -> Similarity<N, D, R>[src]

Creates a new identity similarity.

impl<T> One for rin::math::Complex<T> where
    T: Clone + Num
[src]

Loading content...