hopr_primitive_types::traits

Trait UnitaryFloatOps

Source
pub trait UnitaryFloatOps: Sized {
    // Required methods
    fn mul_f64(&self, rhs: f64) -> Result<Self>;
    fn div_f64(&self, rhs: f64) -> Result<Self>;
}
Expand description

Allows type to be multiplied and divided by a float in range [0.0, 1.0].

Required Methods§

Source

fn mul_f64(&self, rhs: f64) -> Result<Self>

Multiply with float in the interval [0.0, 1.0]

Source

fn div_f64(&self, rhs: f64) -> Result<Self>

Divide by float in the interval (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§