Trait cosmic::cosmic_theme::palette::num::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

Object Safety§

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§