Vec.opUnary

Implements the basic unary operators on a vector. This supports: - Negation -v: Negates all a vector's components. - Incrementation ++v: Increments all a vector's components by 1. - Decrementation --v: Decrements all a vector's components by 1.

struct Vec(T, size_t size)
const @nogc
Vec!(T, size)
opUnary
(
string op
)
()
if (
isNumeric!T &&
size > 0
)

Return Value

Type: Vec!(T, size)

A new vector with the operation applied.

Meta