Skip to main content

Vec3

Trait Vec3 

Source
pub trait Vec3 {
    // Required methods
    fn sub(&self, other: &Self) -> Self;
    fn add(&self, other: &Self) -> Self;
    fn cross(&self, other: &Self) -> Self;
    fn dot(&self, other: &Self) -> f64;
    fn norm(&self) -> f64;
    fn normalized(&self) -> Self;
    fn scale(&self, lambda: f64) -> Self;
}

Required Methods§

Source

fn sub(&self, other: &Self) -> Self

Source

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

Source

fn cross(&self, other: &Self) -> Self

Source

fn dot(&self, other: &Self) -> f64

Source

fn norm(&self) -> f64

Source

fn normalized(&self) -> Self

Source

fn scale(&self, lambda: f64) -> Self

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.

Implementors§