floating_distance/
numeric.rs

1use num_traits::Float;
2use std::ops::{Add, Mul, Sub};
3use crate::*;
4
5/// The floating-point scalar type
6pub trait FloatingPoint:
7  AutoSimdElement + Default + Float {}
8
9/// The floating-point packed type
10pub trait FloatingPoints<T>:
11  AutoSimdFloat<Scalar = T> + Default +
12  Add<Output = Self> + Mul<Output = Self> +
13  Sub<Output = Self> {}
14
15impl FloatingPoint for f32 {}
16impl FloatingPoint for f64 {}
17
18impl FloatingPoints<f32> for AutoSimd<f32> {}
19impl FloatingPoints<f64> for AutoSimd<f64> {}