[][src]Trait splashsurf_lib::Real

pub trait Real: RealField + FromPrimitive + ToPrimitive + Debug + Default + ThreadSafe {
    pub fn try_convert<T: Real>(self) -> Option<T> { ... }
pub fn try_convert_vec_from<R, D>(
        vec: &VectorN<R, D>
    ) -> Option<VectorN<Self, D>>
    where
        R: Real,
        D: DimName,
        DefaultAllocator: Allocator<R, D>,
        DefaultAllocator: Allocator<Self, D>
, { ... }
pub fn to_index<I: Index>(self) -> Option<I> { ... }
pub fn to_index_unchecked<I: Index>(self) -> I { ... }
pub fn times(self, n: i32) -> Self { ... }
pub fn times_f64(self, x: f64) -> Self { ... } }

Trait that has to be implemented for types to be used as floating points values in the context of the library (e.g. for coordinates, density values)

Provided methods

pub fn try_convert<T: Real>(self) -> Option<T>[src]

pub fn try_convert_vec_from<R, D>(
    vec: &VectorN<R, D>
) -> Option<VectorN<Self, D>> where
    R: Real,
    D: DimName,
    DefaultAllocator: Allocator<R, D>,
    DefaultAllocator: Allocator<Self, D>, 
[src]

pub fn to_index<I: Index>(self) -> Option<I>[src]

Converts the value to the specified Index type. If the value cannot be represented by the target type, None is returned.

pub fn to_index_unchecked<I: Index>(self) -> I[src]

Converts the value to the specified Index type, panics if the value cannot be represented by the target type.

pub fn times(self, n: i32) -> Self[src]

Multiplies the value by the specified i32 coefficient. Panics if the coefficient cannot be converted into the target type.

pub fn times_f64(self, x: f64) -> Self[src]

Multiplies the value by the specified f64 coefficient. Panics if the coefficient cannot be converted into the target type.

Loading content...

Implementors

impl<T: RealField + FromPrimitive + ToPrimitive + Debug + Default + ThreadSafe> Real for T[src]

Loading content...