From 847f448ce2570be6098b58ac715d9c71bb6e7634 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Mon, 7 Jul 2025 00:34:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=B2=A1=E6=9C=89=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E6=B5=AE=E7=82=B9=E5=80=BC=E5=81=9Arad2deg/deg2rad?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inc/hgl/math/MathConst.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/inc/hgl/math/MathConst.h b/inc/hgl/math/MathConst.h index c6b1a45..600cfd9 100644 --- a/inc/hgl/math/MathConst.h +++ b/inc/hgl/math/MathConst.h @@ -82,19 +82,17 @@ namespace hgl /** * 角度转弧度 */ - template - inline constexpr T deg2rad(const T deg) + inline constexpr float deg2rad(const float deg) { - return T(deg*(HGL_PI/180.0f)); + return deg*(HGL_PI/180.0f); } /** * 弧度转角度 */ - template - inline constexpr T rad2deg(const T rad) + inline constexpr double rad2deg(const float rad) { - return T(rad*(180.0f/HGL_PI)); + return rad*(180.0f/HGL_PI); } /**