pub trait SignedNumberOps<T: SignedNumber>: Neg<Output = Self> {
    // Required methods
    fn signum(a: Self) -> Self;
    fn abs(a: Self) -> Self;
}
Expand description

operations applicable to signed types

Required Methods§

source

fn signum(a: Self) -> Self

returns sign value of a; -1 = negative, 1 = positive or 0 (integers only)

source

fn abs(a: Self) -> Self

returns the absolute (postive) value of a

Implementations on Foreign Types§

source§

impl SignedNumberOps<i64> for i64

source§

fn signum(v: Self) -> Self

source§

fn abs(v: Self) -> Self

source§

impl SignedNumberOps<f64> for f64

source§

fn signum(v: Self) -> Self

source§

fn abs(v: Self) -> Self

source§

impl SignedNumberOps<i16> for i16

source§

fn signum(v: Self) -> Self

source§

fn abs(v: Self) -> Self

source§

impl SignedNumberOps<i8> for i8

source§

fn signum(v: Self) -> Self

source§

fn abs(v: Self) -> Self

source§

impl SignedNumberOps<i32> for i32

source§

fn signum(v: Self) -> Self

source§

fn abs(v: Self) -> Self

source§

impl SignedNumberOps<f32> for f32

source§

fn signum(v: Self) -> Self

source§

fn abs(v: Self) -> Self

Implementors§