| 1 | //! Float trait |
|---|---|
| 2 | |
| 3 | use cast::From; |
| 4 | use 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. |
| 9 | pub trait Float: |
| 10 | float::Float + From<usize, Output = Self> + From<f32, Output = Self> + Sync + Send |
| 11 | { |
| 12 | } |
| 13 | |
| 14 | impl Float for f32 {} |
| 15 | impl Float for f64 {} |
| 16 |
