[][src]Trait maths_traits::analysis::ordered::Sign

pub trait Sign: Signed {
    fn signum(self) -> Self;
fn abs(self) -> Self; }

Helpful methods for manipulating an element's order relative to 0

Required methods

fn signum(self) -> Self

Returns 1 if positive, -1 if negative, or itself (ie. 0 or NaN) if neither

fn abs(self) -> Self

Returns this element's negative if less than 0 or itself otherwise

Loading content...

Implementations on Foreign Types

impl Sign for i8[src]

impl Sign for i16[src]

impl Sign for i32[src]

impl Sign for i64[src]

impl Sign for i128[src]

impl Sign for isize[src]

impl Sign for u8[src]

impl Sign for u16[src]

impl Sign for u32[src]

impl Sign for u64[src]

impl Sign for u128[src]

impl Sign for usize[src]

impl Sign for f32[src]

impl Sign for f64[src]

Loading content...

Implementors

Loading content...