Skip to main content

MotionValue

Trait MotionValue 

Source
pub trait MotionValue: Copy + PartialEq {
    // Required methods
    fn zero() -> Self;
    fn add(self, other: Self) -> Self;
    fn subtract(self, other: Self) -> Self;
    fn scale(self, factor: f64) -> Self;
    fn magnitude(self) -> f64;
}

Required Methods§

Source

fn zero() -> Self

Source

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

Source

fn subtract(self, other: Self) -> Self

Source

fn scale(self, factor: f64) -> Self

Source

fn magnitude(self) -> f64

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 MotionValue for Color

Source§

fn zero() -> Self

Source§

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

Source§

fn subtract(self, other: Self) -> Self

Source§

fn scale(self, factor: f64) -> Self

Source§

fn magnitude(self) -> f64

Source§

impl MotionValue for Point

Source§

fn zero() -> Self

Source§

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

Source§

fn subtract(self, other: Self) -> Self

Source§

fn scale(self, factor: f64) -> Self

Source§

fn magnitude(self) -> f64

Source§

impl MotionValue for Rect

Source§

fn zero() -> Self

Source§

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

Source§

fn subtract(self, other: Self) -> Self

Source§

fn scale(self, factor: f64) -> Self

Source§

fn magnitude(self) -> f64

Source§

impl MotionValue for Size

Source§

fn zero() -> Self

Source§

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

Source§

fn subtract(self, other: Self) -> Self

Source§

fn scale(self, factor: f64) -> Self

Source§

fn magnitude(self) -> f64

Source§

impl MotionValue for Transform2D

Source§

fn zero() -> Self

Source§

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

Source§

fn subtract(self, other: Self) -> Self

Source§

fn scale(self, factor: f64) -> Self

Source§

fn magnitude(self) -> f64

Source§

impl MotionValue for f32

Source§

fn zero() -> Self

Source§

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

Source§

fn subtract(self, other: Self) -> Self

Source§

fn scale(self, factor: f64) -> Self

Source§

fn magnitude(self) -> f64

Source§

impl MotionValue for f64

Source§

fn zero() -> Self

Source§

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

Source§

fn subtract(self, other: Self) -> Self

Source§

fn scale(self, factor: f64) -> Self

Source§

fn magnitude(self) -> f64

Source§

impl<const N: usize> MotionValue for [f32; N]

Source§

fn zero() -> Self

Source§

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

Source§

fn subtract(self, other: Self) -> Self

Source§

fn scale(self, factor: f64) -> Self

Source§

fn magnitude(self) -> f64

Implementors§