pub trait GenericScalarwhere
Self: Display + Debug + Float + FloatCore + FromPrimitive + ToPrimitive + MulAssign + DivAssign + AddAssign + SubAssign + Default + FromStr + Sync + Send + Into<f64> + From<f32> + From<u16> + From<i16> + From<i8> + From<u8> + Neg<Output = Self> + Signed + LowerExp + AsPrimitive<f64> + AsPrimitive<f32> + AsPrimitive<usize> + AsPrimitive<isize> + AsPrimitive<u64> + AsPrimitive<i64> + AsPrimitive<u32> + AsPrimitive<i32> + AsPrimitive<u16> + AsPrimitive<i16> + AsPrimitive<u8> + AsPrimitive<i8> + UlpsEq<Epsilon = Self>,{
type BitsType: Hash + Eq + Ord + Display + Debug;
const ZERO: Self;
const ONE: Self;
const TWO: Self;
const THREE: Self;
const INFINITY: Self;
const NEG_INFINITY: Self;
const EPSILON: Self;
// Required methods
fn to_bits(self) -> Self::BitsType;
fn from_bits(bits: Self::BitsType) -> Self;
fn clamp(self, min: Self, max: Self) -> Self;
}Expand description
A trait meant to to represent f32 or f64
Required Associated Constants§
const ZERO: Self
const ONE: Self
const TWO: Self
const THREE: Self
const INFINITY: Self
const NEG_INFINITY: Self
const EPSILON: Self
Required Associated Types§
Required Methods§
fn to_bits(self) -> Self::BitsType
fn from_bits(bits: Self::BitsType) -> Self
fn clamp(self, min: Self, max: Self) -> Self
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.