Module devela::cmp

source ·
Available on crate feature cmp only.
Expand description

Comparing and ordering, extends std::cmp.

This module defines many constant functions for comparing primitives, and the pclamp, pmax and pmin functions for comparing partially ordered values.

Functions

  • Compares and returns a clamped total ordered f32 between min and max.
  • Compares and returns a clamped total ordered f64 between min and max.
  • clamp_fsize32-bit or 64-bit
    Compares and returns a clamped total ordered fsize between min and max.
  • Compares and returns a clamped i8 between min and max.
  • Compares and returns a clamped i16 between min and max.
  • Compares and returns a clamped i32 between min and max.
  • Compares and returns a clamped i64 between min and max.
  • Compares and returns a clamped i128 between min and max.
  • Compares and returns a clamped isize between min and max.
  • Compares and returns a clamped u8 between min and max.
  • Compares and returns a clamped u16 between min and max.
  • Compares and returns a clamped u32 between min and max.
  • Compares and returns a clamped u64 between min and max.
  • Compares and returns a clamped u128 between min and max.
  • Compares and returns a clamped usize between min and max.
  • Compares and returns the maximum of two f32 values using total ordering.
  • Compares and returns the maximum of two f64 values using total ordering.
  • max_fsize32-bit or 64-bit
    Compares and returns the maximum of two fsize values using total ordering.
  • Compares and returns the maximum of two i8 values.
  • Compares and returns the maximum of two i16 values.
  • Compares and returns the maximum of two i32 values.
  • Compares and returns the maximum of two i64 values.
  • Compares and returns the maximum of two i128 values.
  • Compares and returns the maximum of two isize values.
  • Compares and returns the maximum of two u8 values.
  • Compares and returns the maximum of two u16 values.
  • Compares and returns the maximum of two u32 values.
  • Compares and returns the maximum of two u64 values.
  • Compares and returns the maximum of two u128 values.
  • Compares and returns the maximum of two usize values.
  • Compares and returns the minimum of two f32 values using total ordering.
  • Compares and returns the minimum of two f64 values using total ordering.
  • min_fsize32-bit or 64-bit
    Compares and returns the minimum of two fsize values using total ordering.
  • Compares and returns the minimum of two i8 values.
  • Compares and returns the minimum of two i16 values.
  • Compares and returns the minimum of two i32 values.
  • Compares and returns the minimum of two i64 values.
  • Compares and returns the minimum of two i128 values.
  • Compares and returns the minimum of two isize values.
  • Compares and returns the minimum of two u8 values.
  • Compares and returns the minimum of two u16 values.
  • Compares and returns the minimum of two u32 values.
  • Compares and returns the minimum of two u64 values.
  • Compares and returns the minimum of two u128 values.
  • Compares and returns the minimum of two usize values.
  • Compares and returns a PartialOrdered value clamped between min and max.
  • Compares and returns the maximum of two PartialOrdered values.
  • Compares and returns the minimum of two PartialOrdered values.
  • A (const) port of f32::total_cmp.
  • A (const) port of f64::total_cmp.
  • total_cmp_fsize32-bit or 64-bit
    A pointer-sized redirect to total_cmp_f[32|64].