Vector.opCast

Converts the vector into an array of the same size.

  1. auto opCast()
  2. auto opCast()
    struct Vector(T, char[] c)
    @safe
    opCast
    (
    F
    )
    ()
    if (
    isArray!F
    )
    if (
    c.length > 1 &&
    areValidCoordinates(c)
    )

Examples

assert(cast(int[])vector(1, 2) == [1, 2]);
assert(cast(long[])vector(.1, 1.5, -.1) == [0L, 1L, 0L]);

Meta