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 trait, without conflicts occurring.

Provided methods

Create a Float from an isize value; this should support constant implementations with no run-time overhead.

Create a Float as a fraction described by a numerator and denomiator pair of isize values; this should support constant implementations with no run-time overhead.

Implementations on Foreign Types

Implementors