hopr_lib

Trait UnitaryFloatOps

Source
pub trait UnitaryFloatOps: Sized {
    // Required methods
    fn mul_f64(&self, rhs: f64) -> Result<Self, GeneralError>;
    fn div_f64(&self, rhs: f64) -> Result<Self, GeneralError>;
}
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, GeneralError>

Multiply with float in the interval [0.0, 1.0]

Source

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

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.

Implementations on Foreign Types§

Source§

impl UnitaryFloatOps for U256

Source§

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

Source§

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

Implementors§