Trait GenVec

Source
pub trait GenVec<T: Primitive>:
    Copy
    + Index<usize, Output = T>
    + IndexMut<usize, Output = T> {
    // Required method
    fn dim() -> usize;
}
Expand description

Generic vector type.

Required Methods§

Source

fn dim() -> usize

Returns the dimension of the vector.

§Example
use glm::GenVec;    // bring the method into scope.
assert_eq!(glm::IVec4::dim(), 4);

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§

Source§

impl<T: Primitive> GenVec<T> for Vector2<T>

Source§

impl<T: Primitive> GenVec<T> for Vector3<T>

Source§

impl<T: Primitive> GenVec<T> for Vector4<T>