diff --git a/inc/hgl/math/MathConst.h b/inc/hgl/math/MathConst.h index f6ed403..1848504 100644 --- a/inc/hgl/math/MathConst.h +++ b/inc/hgl/math/MathConst.h @@ -46,15 +46,15 @@ namespace hgl /** * 角度转弧度 */ - inline double hgl_deg2rad(const double ang) + inline double deg2rad(const double deg) { - return ang*(HGL_PI/180.0f); + return deg*(HGL_PI/180.0f); } /** * 弧度转角度 */ - inline double hgl_rad2deg(const double rad) + inline double rad2deg(const double rad) { return rad*(180.0f/HGL_PI); } diff --git a/src/Math/Matrix4f.cpp b/src/Math/Matrix4f.cpp index d5aca47..4e13032 100644 --- a/src/Math/Matrix4f.cpp +++ b/src/Math/Matrix4f.cpp @@ -78,7 +78,7 @@ namespace hgl float znear, float zfar) { - float f = 1.0f / tan( hgl_deg2rad( 0.5f * field_of_view ) ); + float f = 1.0f / tan( deg2rad( 0.5f * field_of_view ) ); return Matrix4f( f / aspect_ratio,