pub trait MaxMin: PartialOrd {
    // Required methods
    fn get_max(self, other: Self) -> Self;
    fn get_min(self, other: Self) -> Self;
}

Required Methods§

source

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);
source

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);

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl MaxMin for f32

source§

fn get_max(self, other: Self) -> Self

source§

fn get_min(self, other: Self) -> Self

source§

impl MaxMin for f64

source§

fn get_max(self, other: Self) -> Self

source§

fn get_min(self, other: Self) -> Self

source§

impl MaxMin for i8

source§

fn get_max(self, other: Self) -> Self

source§

fn get_min(self, other: Self) -> Self

source§

impl MaxMin for i16

source§

fn get_max(self, other: Self) -> Self

source§

fn get_min(self, other: Self) -> Self

source§

impl MaxMin for i32

source§

fn get_max(self, other: Self) -> Self

source§

fn get_min(self, other: Self) -> Self

source§

impl MaxMin for i64

source§

fn get_max(self, other: Self) -> Self

source§

fn get_min(self, other: Self) -> Self

source§

impl MaxMin for i128

source§

fn get_max(self, other: Self) -> Self

source§

fn get_min(self, other: Self) -> Self

source§

impl MaxMin for u8

source§

fn get_max(self, other: Self) -> Self

source§

fn get_min(self, other: Self) -> Self

source§

impl MaxMin for u16

source§

fn get_max(self, other: Self) -> Self

source§

fn get_min(self, other: Self) -> Self

source§

impl MaxMin for u32

source§

fn get_max(self, other: Self) -> Self

source§

fn get_min(self, other: Self) -> Self

source§

impl MaxMin for u64

source§

fn get_max(self, other: Self) -> Self

source§

fn get_min(self, other: Self) -> Self

source§

impl MaxMin for u128

source§

fn get_max(self, other: Self) -> Self

source§

fn get_min(self, other: Self) -> Self

source§

impl MaxMin for usize

source§

fn get_max(self, other: Self) -> Self

source§

fn get_min(self, other: Self) -> Self

Implementors§