Trait Abs

Source
pub trait Abs {
    type Output;

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

Takes the absolute value of a number. Assumes that the number has a representable absolute number.

Required Associated Types§

Required Methods§

Source

fn abs(self) -> Self::Output

Implementations on Foreign Types§

Source§

impl Abs for f32

Source§

fn abs(self) -> f32

This is a wrapper over the fabs functions from libm.

Source§

type Output = f32

Source§

impl Abs for f64

Source§

fn abs(self) -> f64

This is a wrapper over the fabs functions from libm.

Source§

type Output = f64

Source§

impl Abs for i8

Source§

fn abs(self) -> i8

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

Source§

type Output = i8

Source§

impl Abs for i16

Source§

fn abs(self) -> i16

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

Source§

type Output = i16

Source§

impl Abs for i32

Source§

fn abs(self) -> i32

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

Source§

type Output = i32

Source§

impl Abs for i64

Source§

fn abs(self) -> i64

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

Source§

type Output = i64

Source§

impl Abs for i128

Source§

fn abs(self) -> i128

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

Source§

type Output = i128

Source§

impl Abs for isize

Source§

fn abs(self) -> isize

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

Source§

type Output = isize

Implementors§