Trait geo_nd::Float [−][src]
pub trait Float: Num + Float {
fn int(n: isize) -> Self { ... }
fn frac(n: isize, d: usize) -> Self { ... }
}
Expand description
The Float trait is required for matrix or vector elements which have a float aspect, such as sqrt
.
The trait is essentially num_traits::Float
, but it supplies
implicit methods for construction of a Float from an isize
value, or as a rational from a pair of isize
values.
As num_traits::Float includes num_traits::NumCast it is not
possible to require, as would perhaps be desired, a From
Provided methods
Create a Float from an isize
value; this should support
constant implementations with no run-time overhead.