Macro shades::vec3 [−][src]
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 typesT
satisfyingVec3
are castable.vec3!(xy, z)
, which builds aV3<T>
withxy
a value that can be turned into aExpr<V2<T>>
andz: T
vec3!(x, y, z)
, which builds aV3<T>
forx: T
,y: T
andz: T
.
Examples
use shades::{vec2, vec3}; let _ = vec3!(1, 2, 3); let _ = vec3!(vec2!(1, 2), 3);