diff --git a/cocos/core/math/vec3.ts b/cocos/core/math/vec3.ts index 8533bede8b8..5767065eec4 100644 --- a/cocos/core/math/vec3.ts +++ b/cocos/core/math/vec3.ts @@ -955,7 +955,11 @@ export class Vec3 extends ValueType { * @returns Returns `true` when the components of both vectors are equal within the specified range of error; otherwise it returns `false`. */ public equals (other: Vec3, epsilon = EPSILON): boolean { - return Vec3.equals(this, other, epsilon); + return ( + abs(this.x - other.x) <= epsilon + && abs(this.y - other.y) <= epsilon + && abs(this.z - other.z) <= epsilon + ); } /**