[][src]Trait mathru::algebra::abstr::Sign

pub trait Sign: Sized + Neg<Output = Self> {
    pub fn sign(&self) -> Self;
pub fn abs(&self) -> Self;
pub fn is_positive(&self) -> bool;
pub fn is_negative(&self) -> bool; }

Sign trait

Required methods

pub fn sign(&self) -> Self[src]

Returns the sign of a number

Param

Return

-1 if self < 0 0 if self = 0 1 if self > 0

pub fn abs(&self) -> Self[src]

pub fn is_positive(&self) -> bool[src]

pub fn is_negative(&self) -> bool[src]

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 f32[src]

impl Sign for f64[src]

Loading content...

Implementors

impl<T> Sign for Vector<T> where
    T: Field + Scalar
[src]

Loading content...