Skip to main content

Vector3::equals

This function is used to test where two Vector3s equal each other.

Syntax​

vector.equals(Vector3 otherVec);

Required Arguments​

  • otherVec: Vector3: The vector to compare to the callee.

Returns​

  • boolean Whether the vectors are equal.

Example #1​

Server-Side

const vec1 = new mp.Vector3(5, 5, 5);
const vec2 = new mp.Vector3(5, 5, 5);

vec1.equals(vec2); // true
vec1.equals(new mp.Vector3(0, 0, 0)); // false