Abs

Trait Abs 

Source
pub trait Abs {
    type Output;

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

This trait provides the interface for the function used to compute the absolute value of a number.

Required Associated Types§

Source

type Output

The return type of the absolute value function. It is always a real number (also when the input is a complex number).

Required Methods§

Source

fn abs(self) -> Self::Output

Returns the absolute value of self. The return type is always a real number (also when self is a complex number)

Implementations on Foreign Types§

Source§

impl Abs for f64

Implementation of the Abs trait for f64.

Source§

type Output = f64

The return type of the absolute value function.

Source§

fn abs(self) -> Self::Output

Returns the absolute value of self.

Source§

impl Abs for Complex<f64>

Implementation of the Abs trait for Complex<f64>.

Source§

type Output = f64

The return type of the absolute value function.

Source§

fn abs(self) -> Self::Output

Returns the absolute value of self.

Implementors§