Vec.opCmp

Compares this vector to another, based on their magnitudes.

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

Parameters

other MY_TYPE

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