Trait hyperloglog_rs::prelude::MaxMin
source · pub trait MaxMin: PartialOrd {
// Required methods
fn get_max(self, other: Self) -> Self;
fn get_min(self, other: Self) -> Self;
fn non_zero_positive_min_value() -> Self;
}Required Methods§
sourcefn get_max(self, other: Self) -> Self
fn get_max(self, other: Self) -> Self
Returns the maximum of two numbers.
Examples
use hyperloglog_rs::prelude::*;
let max = 2.0_f32.max(3.0_f32);
assert_eq!(max, 3.0_f32);
sourcefn get_min(self, other: Self) -> Self
fn get_min(self, other: Self) -> Self
Returns the minimum of two numbers.
Examples
use hyperloglog_rs::prelude::*;
let min = 2.0_f32.min(3.0_f32);
assert_eq!(min, 2.0_f32);
sourcefn non_zero_positive_min_value() -> Self
fn non_zero_positive_min_value() -> Self
Returns the non-zero positive minimum value that can be represented by this type.
Examples
use hyperloglog_rs::prelude::*;
let min = f32::non_zero_positive_min_value();
assert_eq!(min, f32::EPSILON);
Object Safety§
This trait is not object safe.