From c54ae1f6af30519a5ea4c59251549552ecdb77fd Mon Sep 17 00:00:00 2001 From: linbingquan <695601626@qq.com> Date: Wed, 6 Nov 2024 21:21:57 +0800 Subject: [PATCH] src: Use MathUtils.clamp for `Spherical.makeSafe` --- src/math/Spherical.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/math/Spherical.js b/src/math/Spherical.js index 315ffb59c2b198..587294931e55db 100644 --- a/src/math/Spherical.js +++ b/src/math/Spherical.js @@ -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;