Vector.opEquals

Compares the vector with another vector of the same length or with a single number.

struct Vector(T, char[] c)
bool
opEquals
(
F
)
()
if (
c.length > 1 &&
areValidCoordinates(c)
)

Return Value

Type: bool

true if all the values are equals, false otherwise

Examples

assert(Vector2!int(0, 10) == Vector2!int(0, 10));
assert(Vector3!ubyte(1, 1, 255) == Vector3!real(1, 1, 255));
assert(vector(0, 0, 0, 0) == 0);
assert(vector(1, 2) == [1, 2]);
assert(vector(float.nan, float.nan) != vector(float.nan, float.nan));

Meta