Vector.opCast

struct Vector(T, ubyte N)
const
U
opCast
(
U
)
()
if (
isVector!U &&
U.size == size
)
if (
N >= 2 &&
N <= 4
)

Examples

const v1 = Vector2F(1.3f, -5.7f);
auto v2 = cast(Vector2I)v1;
assert(v2.v == [1, -5]);

Meta