Skip to main content

Numeric

Trait Numeric 

Source
pub trait Numeric<I: TeXInt>:
    Eq
    + Ord
    + Neg<Output = Self>
    + Add<Self, Output = Self>
    + Mul<I, Output = Self>
    + Div<I, Output = Self>
    + Copy
    + Default
    + Debug
    + Display {
    // Required method
    fn scale(&self, times: I, div: I) -> Self;
}
Expand description

Generalization of integers, dimensions, skips, etc. In particular, provides a scale method to scale all of them by their integer type.

Required Methods§

Source

fn scale(&self, times: I, div: I) -> Self

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 Numeric<i32> for i32

Source§

fn scale(&self, times: i32, div: i32) -> Self

Implementors§

Source§

impl Numeric<i32> for Dim32

Source§

impl Numeric<i32> for Mu

Source§

impl<I: TeXInt, D: TeXDimen + Numeric<I>> Numeric<I> for Skip<D>

Source§

impl<I: TeXInt, M: MuDim + Numeric<I>> Numeric<I> for MuSkip<M>