cosmic::cosmic_theme::palette::num

Trait Signum

Source
pub trait Signum {
    // Required method
    fn signum(self) -> Self;
}
Expand description

Trait for getting a number that represents the sign of self.

Required Methods§

Source

fn signum(self) -> Self

Returns a number that represents the sign of self. For floating point:

  • 1.0 if the number is positive, +0.0 or INFINITY
  • -1.0 if the number is negative, -0.0 or NEG_INFINITY
  • NaN if the number is NaN

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.

Implementations on Foreign Types§

Source§

impl Signum for f32

Source§

fn signum(self) -> f32

Source§

impl Signum for f64

Source§

fn signum(self) -> f64

Implementors§