Trait tween::TweenTime

source ·
pub trait TweenTime: Copy + PartialEq + PartialOrd + Debug + Add<Output = Self> + AddAssign + Rem<Output = Self> + Sub<Output = Self> {
    const ZERO: Self;

    // Required method
    fn to_f32(self) -> f32;
}
Expand description

A TweenTime is a representation of Time. The two most common will be f32/f64 for seconds and u32/u64/usize for frames.

If you want to implement your own time for duration, then you’ll need to implement this trait.

Required Associated Constants§

source

const ZERO: Self

The ZERO value. This is 0 or 0.0.

Required Methods§

source

fn to_f32(self) -> f32

Converts the given number to an f32.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl TweenTime for f32

source§

const ZERO: Self = 0f32

source§

fn to_f32(self) -> f32

source§

impl TweenTime for f64

source§

const ZERO: Self = 0f64

source§

fn to_f32(self) -> f32

source§

impl TweenTime for i8

source§

const ZERO: Self = 0i8

source§

fn to_f32(self) -> f32

source§

impl TweenTime for i16

source§

const ZERO: Self = 0i16

source§

fn to_f32(self) -> f32

source§

impl TweenTime for i32

source§

const ZERO: Self = 0i32

source§

fn to_f32(self) -> f32

source§

impl TweenTime for i64

source§

const ZERO: Self = 0i64

source§

fn to_f32(self) -> f32

source§

impl TweenTime for i128

source§

const ZERO: Self = 0i128

source§

fn to_f32(self) -> f32

source§

impl TweenTime for isize

source§

const ZERO: Self = 0isize

source§

fn to_f32(self) -> f32

source§

impl TweenTime for u8

source§

const ZERO: Self = 0u8

source§

fn to_f32(self) -> f32

source§

impl TweenTime for u16

source§

const ZERO: Self = 0u16

source§

fn to_f32(self) -> f32

source§

impl TweenTime for u32

source§

const ZERO: Self = 0u32

source§

fn to_f32(self) -> f32

source§

impl TweenTime for u64

source§

const ZERO: Self = 0u64

source§

fn to_f32(self) -> f32

source§

impl TweenTime for u128

source§

const ZERO: Self = 0u128

source§

fn to_f32(self) -> f32

source§

impl TweenTime for usize

source§

const ZERO: Self = 0usize

source§

fn to_f32(self) -> f32

Implementors§