Skip to content

Commit

Permalink
src: Use MathUtils.clamp for Spherical.makeSafe (#29824)
Browse files Browse the repository at this point in the history
  • Loading branch information
linbingquan authored Nov 6, 2024
1 parent 7905c96 commit 5d71052
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/math/Spherical.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Spherical {
makeSafe() {

const EPS = 0.000001;
this.phi = Math.max( EPS, Math.min( Math.PI - EPS, this.phi ) );
this.phi = MathUtils.clamp( this.phi, EPS, Math.PI - EPS );

return this;

Expand Down

0 comments on commit 5d71052

Please sign in to comment.