Vector.opUnary

Returns a new vector with unary operator applied to all elements

struct Vector(T, uint N)
pure const
opUnary
(
string op
)
()
if (
op.among("-", "+", "~")
)
if (
N > 0
)

Examples

assert(-Vec2(1, -2) == [-1, 2]);

Meta