Trait Curved

Source
pub trait Curved {
    // Required methods
    fn zero() -> Self;
    fn one() -> Self;
    fn negate(&self) -> Self;
    fn scale(&self, value: Scalar) -> Self;
    fn inverse_scale(&self, value: Scalar) -> Self;
    fn length(&self) -> Scalar;
    fn length_squared(&self) -> Scalar;
    fn get_axis(&self, index: usize) -> Option<Scalar>;
    fn interpolate(&self, other: &Self, factor: Scalar) -> Self;
    fn is_valid(&self) -> bool;
}

Required Methods§

Source

fn zero() -> Self

Source

fn one() -> Self

Source

fn negate(&self) -> Self

Source

fn scale(&self, value: Scalar) -> Self

Source

fn inverse_scale(&self, value: Scalar) -> Self

Source

fn length(&self) -> Scalar

Source

fn length_squared(&self) -> Scalar

Source

fn get_axis(&self, index: usize) -> Option<Scalar>

Source

fn interpolate(&self, other: &Self, factor: Scalar) -> Self

Source

fn is_valid(&self) -> bool

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 Curved for (Scalar, Scalar)

Source§

fn zero() -> Self

Source§

fn one() -> Self

Source§

fn negate(&self) -> Self

Source§

fn scale(&self, value: Scalar) -> Self

Source§

fn inverse_scale(&self, value: Scalar) -> Self

Source§

fn length(&self) -> Scalar

Source§

fn length_squared(&self) -> Scalar

Source§

fn get_axis(&self, index: usize) -> Option<Scalar>

Source§

fn interpolate(&self, other: &Self, factor: Scalar) -> Self

Source§

fn is_valid(&self) -> bool

Source§

impl Curved for Scalar

Source§

fn zero() -> Self

Source§

fn one() -> Self

Source§

fn negate(&self) -> Self

Source§

fn scale(&self, value: Scalar) -> Self

Source§

fn inverse_scale(&self, value: Scalar) -> Self

Source§

fn length(&self) -> Scalar

Source§

fn length_squared(&self) -> Scalar

Source§

fn get_axis(&self, index: usize) -> Option<Scalar>

Source§

fn interpolate(&self, other: &Self, factor: Scalar) -> Self

Source§

fn is_valid(&self) -> bool

Source§

impl<T> Curved for Arc<RwLock<T>>
where T: Curved,

Source§

fn zero() -> Self

Source§

fn one() -> Self

Source§

fn negate(&self) -> Self

Source§

fn scale(&self, value: Scalar) -> Self

Source§

fn inverse_scale(&self, value: Scalar) -> Self

Source§

fn length(&self) -> Scalar

Source§

fn length_squared(&self) -> Scalar

Source§

fn get_axis(&self, index: usize) -> Option<Scalar>

Source§

fn interpolate(&self, other: &Self, factor: Scalar) -> Self

Source§

fn is_valid(&self) -> bool

Implementors§