vecstasy 0.1.10

vecstasy is a library for SIMD-enabled floating-point operations on vectors.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/// A generic vector-like type supporting common vector operations.
///
/// This trait defines three fundamental operations on vectors:
/// - Squared L2 (Euclidean) distance
/// - Dot (inner) product
/// - Normalization returning an owned vector
///
/// # Associated Types
/// - `Owned`: The owned vector type returned by `normalized`.
pub trait VecLike {
    /// The owned vector type returned by `normalized`.
    type Owned;
    fn l2_dist_squared(&self, othr: &Self) -> f32;
    fn dot(&self, othr: &Self) -> f32;
    fn normalized(&self) -> Self::Owned;
}