Trait malachite_base::num::arithmetic::traits::SaturatingAbs

source ·
pub trait SaturatingAbs {
    type Output;

    // Required method
    fn saturating_abs(self) -> Self::Output;
}
Expand description

Takes the absolute value of a number, saturating at the numeric bounds instead of overflowing.

Required Associated Types§

Required Methods§

source

fn saturating_abs(self) -> Self::Output

Implementations on Foreign Types§

source§

impl SaturatingAbs for i8

source§

fn saturating_abs(self) -> i8

This is a wrapper over the saturating_abs functions in the standard library, for example this one.

§

type Output = i8

source§

impl SaturatingAbs for i16

source§

fn saturating_abs(self) -> i16

This is a wrapper over the saturating_abs functions in the standard library, for example this one.

§

type Output = i16

source§

impl SaturatingAbs for i32

source§

fn saturating_abs(self) -> i32

This is a wrapper over the saturating_abs functions in the standard library, for example this one.

§

type Output = i32

source§

impl SaturatingAbs for i64

source§

fn saturating_abs(self) -> i64

This is a wrapper over the saturating_abs functions in the standard library, for example this one.

§

type Output = i64

source§

impl SaturatingAbs for i128

source§

fn saturating_abs(self) -> i128

This is a wrapper over the saturating_abs functions in the standard library, for example this one.

§

type Output = i128

source§

impl SaturatingAbs for isize

source§

fn saturating_abs(self) -> isize

This is a wrapper over the saturating_abs functions in the standard library, for example this one.

§

type Output = isize

Implementors§