Trait splashsurf_lib::Real [−][src]
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]
R: Real,
D: DimName,
DefaultAllocator: Allocator<R, D>,
DefaultAllocator: Allocator<Self, D>,
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.