FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ExpressionNumber

    trait · ferroui-controls · v0.5.0

    trait ExpressionNumber: Copy
    

    A number type the expressions are evaluated with: its arithmetic, None where a result is not a value of the type.

    View source

    Members

    is_zero

    fn is_zero(self: &Self) -> bool
    

    Whether the number is zero (a divisor that is zero is a division by zero).

    Source

    add

    fn add(self: Self, other: Self) -> Option<Self>
    

    The sum.

    Source

    sub

    fn sub(self: Self, other: Self) -> Option<Self>
    

    The difference.

    Source

    mul

    fn mul(self: Self, other: Self) -> Option<Self>
    

    The product.

    Source

    div

    fn div(self: Self, other: Self) -> Option<Self>
    

    The quotient; other is not zero.

    Source

    pow

    fn pow(self: Self, exponent: Self) -> Option<Self>
    

    self raised to the power exponent.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.