Module libera::devela::cmp

source ·
Expand description

Comparing and ordering, extends core::cmp.

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

Functions

  • clamp_f32unsafe_cmp or
    Compares and returns a f32 clamped between min and max using total ordering.
  • clamp_f64unsafe_cmp or
    Compares and returns a f64 clamped between min and max using total ordering.
  • Compares and returns a i8 clamped between min and max.
  • Compares and returns a i16 clamped between min and max.
  • Compares and returns a i32 clamped between min and max.
  • Compares and returns a i64 clamped between min and max.
  • Compares and returns a i128 clamped between min and max.
  • Compares and returns a isize clamped between min and max.
  • Compares and returns a u8 clamped between min and max.
  • Compares and returns a u16 clamped between min and max.
  • Compares and returns a u32 clamped between min and max.
  • Compares and returns a u64 clamped between min and max.
  • Compares and returns a u128 clamped between min and max.
  • Compares and returns a usize clamped between min and max.
  • max_f32unsafe_cmp or
    Compares and returns the maximum of two f32 values using total ordering.
  • max_f64unsafe_cmp or
    Compares and returns the maximum of two f64 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.
  • min_f32unsafe_cmp or
    Compares and returns the minimum of two f32 values using total ordering.
  • min_f64unsafe_cmp or
    Compares and returns the minimum of two f64 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.
  • total_cmp_f32unsafe_cmp or
    A port of f32::total_cmp.
  • total_cmp_f64unsafe_cmp or
    A port of f64::total_cmp.