Skip to main content

Base

Trait Base 

Source
pub trait Base<T>:
    Copy
    + Display
    + Add<Output = Self>
    + AddAssign
    + Sub<Output = Self>
    + SubAssign
    + Mul<Output = Self>
    + MulAssign
    + Div<Output = Self>
    + DivAssign
    + Rem<Output = Self>
    + RemAssign
    + Sized
where T: Number,
{ // Required methods fn zero() -> Self; fn one() -> Self; fn two() -> Self; fn three() -> Self; fn four() -> Self; fn min_value() -> Self; fn max_value() -> Self; }
Expand description

base trait for scalar and vector numerical operations, arithmetic and generic constants

Required Methods§

Source

fn zero() -> Self

returns 0

Source

fn one() -> Self

returns 1

Source

fn two() -> Self

returns 2

Source

fn three() -> Self

returns 3

Source

fn four() -> Self

returns 4

Source

fn min_value() -> Self

returns the smallest representable number with the available precision

Source

fn max_value() -> Self

returns the largest representable number with the available precision

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Base<f32> for f32

Source§

impl Base<f64> for f64

Source§

impl Base<i8> for i8

Source§

impl Base<i16> for i16

Source§

impl Base<i32> for i32

Source§

impl Base<i64> for i64

Source§

impl Base<isize> for isize

Source§

impl Base<u8> for u8

Source§

impl Base<u16> for u16

Source§

impl Base<u32> for u32

Source§

impl Base<u64> for u64

Source§

impl Base<usize> for usize

Implementors§

Source§

impl<T> Base<T> for Vec2<T>
where T: Number,

Source§

impl<T> Base<T> for Vec3<T>
where T: Number,

Source§

impl<T> Base<T> for Vec4<T>
where T: Number,