pub trait Vector<T: Scalar, const N: usize>:
Copy
+ Clone
+ Send
+ Sync
+ 'static
+ Default
+ PartialEq
+ Debug
+ Add<Output = Self>
+ Sub<Output = Self>
+ Mul<Output = Self>
+ Div<Output = Self>
+ Rem<Output = Self>
+ Neg<Output = Self> {
Show 15 methods
// Required methods
fn splat(value: T) -> Self;
fn load(slice: &[T]) -> Self;
fn store(&self, slice: &mut [T]);
fn extract(&self, index: usize) -> T;
fn insert(&self, index: usize, value: T) -> Self;
fn add(&self, other: &Self) -> Self;
fn sub(&self, other: &Self) -> Self;
fn mul(&self, other: &Self) -> Self;
fn div(&self, other: &Self) -> Self;
fn rem(&self, other: &Self) -> Self;
fn neg(&self) -> Self;
fn abs(&self) -> Self;
fn min(&self, other: &Self) -> Self;
fn max(&self, other: &Self) -> Self;
fn clamp(&self, min: &Self, max: &Self) -> Self;
}Expand description
Core trait for vector types (basic operations).
Parameterised by element type T: Scalar and lane width N.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl Vector<f32, 4> for rill_core::math::vector::simd::wide::F32x4
Available on crate feature
simd and (x86 or x86-64) only.impl Vector<f32, 4> for rill_core::math::vector::simd::x86::F32x4
Available on x86 or x86-64 only.
impl Vector<f32, 8> for F32x8
Available on crate feature
simd and (x86 or x86-64) only.impl Vector<f64, 2> for F64x2
Available on crate feature
simd and (x86 or x86-64) only.impl Vector<f64, 4> for F64x4
Available on crate feature
simd and (x86 or x86-64) only.