Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ubuntu
committed
Aug 22, 2016
1 parent
5981d0b
commit bdbd778
Showing
63 changed files
with
12,011 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#ifndef _CONSTANT_H_ | ||
#define _CONSTANT_H_ | ||
|
||
#include <limits> | ||
|
||
namespace hstd { | ||
|
||
|
||
template<typename T> | ||
inline T PI() { | ||
return 3.1415926535897931; | ||
}; | ||
|
||
template<> | ||
inline float PI() { | ||
return 3.1415927f; | ||
}; | ||
|
||
template<> | ||
inline double PI() { | ||
return 3.1415926535897931; | ||
}; | ||
|
||
static const float kPI = PI<float>(); | ||
|
||
static const float kINF = std::numeric_limits<float>::infinity(); | ||
|
||
} // namespace hstd | ||
|
||
#endif // _CONSTANT_H_ |
Oops, something went wrong.