pub fn vec3<T>(x: T, y: T, z: T) -> Vec3<T>Expand description
Creates a new Vec3 with the given components.
This helper function provides a concise way to instantiate a Vec3.
§Arguments
x- The x-coordinate of the vector.y- The y-coordinate of the vector.z- The z-coordinate of the vector.
§Returns
A new Vec3<T> with the specified components.
§Examples
use robomath::vec3;
let v = vec3(1.0, 2.0, 3.0);
assert_eq!(v.x, 1.0);
assert_eq!(v.y, 2.0);
assert_eq!(v.z, 3.0);