1//! Float trait
2
3use cast::From;
4use num_traits::float;
5
6/// This is an extension of `num_traits::float::Float` that adds safe
7/// casting and Sync + Send. Once `num_traits` has these features this
8/// can be removed.
9pub trait Float:
10 float::Float + From<usize, Output = Self> + From<f32, Output = Self> + Sync + Send
11{
12}
13
14impl Float for f32 {}
15impl Float for f64 {}
16