optimized function's name that they are deg2rad and rad2deg
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user