SignedExt

Trait SignedExt 

Source
pub trait SignedExt: Signed {
    // Provided methods
    fn sign(self) -> Sign { ... }
    fn signum_or_zero(self) -> Self
       where Self: Zero { ... }
}
Expand description

Function returning number representing sign of self

Provided Methods§

Source

fn sign(self) -> Sign

Source

fn signum_or_zero(self) -> Self
where Self: Zero,

Maps 0.0 to 0.0, otherwise equal to S::signum (which would otherwise map +0.0 -> 1.0 and -0.0 -> -1.0)

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.

Implementors§

Source§

impl<T: Signed> SignedExt for T