updated few codes of FLOAT MIN/MAX

This commit is contained in:
hyzboy 2024-10-07 00:58:01 +08:00
parent 2ebd4b4ac9
commit 6f735880f3
2 changed files with 11 additions and 5 deletions

View File

@ -6,10 +6,13 @@
namespace hgl namespace hgl
{ {
constexpr const float HGL_FLOAT_MIN =1.175494351e-38f; ///<最小浮点数 constexpr const float HGL_FLOAT_MIN =std::numeric_limits<float>::min(); ///<最小浮点数
constexpr const float HGL_FLOAT_MAX =3.402823466e+38f; ///<最大浮点数 constexpr const float HGL_FLOAT_MAX =std::numeric_limits<float>::max(); ///<最大浮点数
constexpr const float HGL_FLOAT_EPSILON =std::numeric_limits<float>::epsilon(); ///<浮点数精度最小值 constexpr const float HGL_FLOAT_EPSILON =std::numeric_limits<float>::epsilon(); ///<浮点数精度最小值
constexpr const double HGL_DOUBLE_EPSILON =std::numeric_limits<double>::epsilon(); ///<双精度浮点数精度最小值
constexpr const double HGL_DOUBLE_MIN =std::numeric_limits<double>::min(); ///<最小双精度浮点数
constexpr const double HGL_DOUBLE_MAX =std::numeric_limits<double>::max(); ///<最大双精度浮点数
constexpr const double HGL_DOUBLE_EPSILON =std::numeric_limits<double>::epsilon(); ///<双精度浮点数精度最小值
template<typename T> bool IsNearlyZero(const T value); template<typename T> bool IsNearlyZero(const T value);

View File

@ -6,13 +6,16 @@ namespace hgl
{ {
class ObjectManager; class ObjectManager;
/**
*
*/
struct ObjectBaseInfo struct ObjectBaseInfo
{ {
size_t hash_code; ///<对象数据类型的hash值 size_t hash_code; ///<对象数据类型的hash值
ObjectManager * object_manager; ///<对象管理器 ObjectManager * object_manager; ///<对象管理器
size_t serial_number; ///<对象序列号 size_t serial_number; ///<对象序列号
SourceCodeLocation source_code_location; SourceCodeLocation source_code_location; ///<对象创建的源代码位置
}; };
}//namespace hgl }//namespace hgl