typst_utils

Trait Numeric

source
pub trait Numeric:
    Sized
    + Debug
    + Copy
    + PartialEq
    + Neg<Output = Self>
    + Add<Output = Self>
    + Sub<Output = Self>
    + Mul<f64, Output = Self>
    + Div<f64, Output = Self> {
    // Required methods
    fn zero() -> Self;
    fn is_finite(self) -> bool;

    // Provided method
    fn is_zero(self) -> bool { ... }
}
Expand description

A numeric type.

Required Methods§

source

fn zero() -> Self

The identity element for addition.

source

fn is_finite(self) -> bool

Whether self consists only of finite parts.

Provided Methods§

source

fn is_zero(self) -> bool

Whether self is zero.

Object Safety§

This trait is not object safe.

Implementors§