Skip to main content

Abs

Trait Abs 

Source
pub trait Abs {
    // Required method
    fn abs(self) -> Self;
}
Expand description

Method for getting the absolute value of a number.

Required Methods§

Source

fn abs(self) -> Self

Returns the absolute value of self.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Abs for f32

Available on crate feature std, or non-crate feature libm only.
Source§

fn abs(self) -> f32

Source§

impl Abs for f64

Available on crate feature std, or non-crate feature libm only.
Source§

fn abs(self) -> f64

Implementors§