Expand description
Vector mathematics module providing 2D, 3D, and 4D vector operations.
This module provides generic vector types and operations for computer graphics and linear algebra applications. All vectors support standard arithmetic operations, dot products, and component-wise operations.
§Examples
use rs_math3d::vector::{FloatVector, Vector, Vector3};
let v1 = Vector3::new(1.0, 2.0, 3.0);
let v2 = Vector3::new(4.0, 5.0, 6.0);
// Vector addition
let sum = v1 + v2;
// Dot product
let dot = Vector3::dot(&v1, &v2);
// Normalization
let normalized = v1.normalize();Structs§
- Vector2
- A 2D vector with x and y components.
- Vector3
- A 3D vector with x, y, and z components.
- Vector4
- A 4D vector with x, y, z, and w components.
Traits§
- Cross
Product - Trait for computing the cross product of 3D vectors.
- Float
Vector - Trait for vectors with floating-point components.
- Swizzle2
- Trait for 2D swizzle operations on vectors.
- Swizzle3
- Trait for 3D swizzle operations on vectors.
- Vector
- Generic vector trait defining common vector operations.