Vec.opCmp

Compares this vector to another, based on their magnitudes.

struct Vec(T, size_t size)
const @nogc
int
opCmp
(
Vec!(T, size) other
)
if (
isNumeric!T &&
size > 0
)

Parameters

other Vec!(T, size)

The vector to compare to.

Return Value

Type: int

0 if the vectors have equal magnitude, 1 if this vector's magnitude is bigger, and -1 if the other's is bigger.

Meta