Skip to main content

Float

Trait Float 

Source
pub trait Float:
    RealField
    + Copy
    + From<f32>
    + 'static
    + Seal { }
Expand description

Float type alias used throughout the crate.

Constraints:

  • nalgebra::RealField — the algorithm-shaped numeric bound (covers arithmetic, ordering, transcendentals, pi(), default_epsilon()).
  • Copy — every Float value is small enough to pass by value.
  • From<f32> — literal constants convert directly via F::from(0.5_f32).
  • 'static — required by kiddo and serde where the bound surfaces.

The bound is sealed via a private Seal super-trait so that extending the constraint in a future minor release is non-breaking.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> Float for T
where T: RealField + Copy + From<f32> + 'static,