[][src]Trait splashsurf_lib::Real

pub trait Real: RealField + FromPrimitive + ToPrimitive + Debug + Default + ThreadSafe {
    fn try_convert<T: Real>(self) -> Option<T> { ... }
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>
, { ... }
fn to_index<I: Index>(self) -> Option<I> { ... }
fn to_index_unchecked<I: Index>(self) -> I { ... }
fn times(self, n: i32) -> Self { ... }
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

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

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]

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.

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.

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.

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 + 'static> Real for T[src]

Loading content...