Skip to content

Commit

Permalink
[v3.8.5] Fix light probe could not work. (#17999)
Browse files Browse the repository at this point in the history
It's a bug starts from v3.8.5 branch: #17703
  • Loading branch information
dumganhar authored Dec 3, 2024
1 parent fb4d2b0 commit b4a5a7c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cocos/core/math/vec3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}

/**
Expand Down

0 comments on commit b4a5a7c

Please sign in to comment.