Trait glm::SignedNum
[−]
[src]
pub trait SignedNum: Sized + Neg<Output = Self> + Sub<Self, Output = Self> { fn abs(&self) -> Self; fn sign(&self) -> Self; }
Trait for numerical types that have negative values.
Required Methods
fn abs(&self) -> Self
Returns the absolute value of the receiver.
fn sign(&self) -> Self
Returns the sign number of the receiver.
Example
use glm::{ SignedNum, dvec3 }; assert_eq!(dvec3(2.718, 0., -0.).sign(), dvec3(1., 0., 0.));
Implementations on Foreign Types
impl SignedNum for i32
[src]
impl SignedNum for i32
impl SignedNum for f32
[src]
impl SignedNum for f32
impl SignedNum for f64
[src]
impl SignedNum for f64