macro_rules! vec3 {
    ($a:expr) => { ... };
    ($xy:expr, $z:expr) => { ... };
    ($x:expr, $y:expr, $z:expr) => { ... };
}
Expand description

Create 3D scalar vectors via different forms.

This macro allows to create 3D (V3) scalar vectors from several forms:

  • vec3!(xyz), which acts as the cast operator. Only types T satisfying [Vec3] are castable.
  • vec3!(xy, z), which builds a V3<T> with xy a value that can be turned into a Expr<V2<T>> and z: T
  • vec3!(x, y, z), which builds a V3<T> for x: T, y: T and z: T.