Trait numcodecs_linear_quantize::Float
source · pub trait Float:
Copy
+ Serialize
+ DeserializeOwned
+ Sub<Self, Output = Self>
+ Div<Self, Output = Self>
+ Add<Self, Output = Self>
+ Mul<Self, Output = Self>
+ PartialEq {
const ZERO: Self;
const ONE: Self;
// Required methods
fn minimum(self, other: Self) -> Self;
fn maximum(self, other: Self) -> Self;
fn clamp(self, min: Self, max: Self) -> Self;
fn scale_for_bits(bits: u8) -> Self;
fn is_finite(self) -> bool;
}
Expand description
Floating point types.
Required Associated Constants§
Required Methods§
sourcefn clamp(self, min: Self, max: Self) -> Self
fn clamp(self, min: Self, max: Self) -> Self
Restrict a value to a certain interval unless it is NaN.
sourcefn scale_for_bits(bits: u8) -> Self
fn scale_for_bits(bits: u8) -> Self
Returns exp2(bits) - 1.0
Object Safety§
This trait is not object safe.