use core::{
fmt::Debug,
ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Neg, Sub, SubAssign},
};
use approx::{AbsDiffEq, RelativeEq, UlpsEq};
use core_maths::CoreFloat;
pub trait Scalar:
Copy
+ Debug
+ PartialEq
+ PartialOrd
+ Add<Output = Self>
+ AddAssign
+ Sub<Output = Self>
+ SubAssign
+ Mul<Output = Self>
+ MulAssign
+ Div<Output = Self>
+ DivAssign
+ Neg
{
const ZERO: Self;
const ONE: Self;
}
pub trait FloatScalar:
Scalar + CoreFloat + AbsDiffEq<Epsilon = Self> + RelativeEq<Epsilon = Self> + UlpsEq<Epsilon = Self>
{
const INFINITY: Self;
const NEG_INFINITY: Self;
const NAN: Self;
}