Constants.hpp File Reference

Go to the source code of this file.

Namespaces

 CubbyFlow
 

Functions

template<typename T >
constexpr T CubbyFlow::Zero ()
 Zero for type T. More...
 
template<>
constexpr float CubbyFlow::Zero< float > ()
 Zero for float. More...
 
template<>
constexpr double CubbyFlow::Zero< double > ()
 Zero for double. More...
 
template<typename T >
constexpr T CubbyFlow::One ()
 One for type T. More...
 
template<>
constexpr float CubbyFlow::One< float > ()
 One for float. More...
 
template<>
constexpr double CubbyFlow::One< double > ()
 One for double. More...
 
template<typename T >
constexpr T CubbyFlow::PI ()
 PI for type T. More...
 
template<>
constexpr float CubbyFlow::PI< float > ()
 Pi for float. More...
 
template<>
constexpr double CubbyFlow::PI< double > ()
 Pi for double. More...
 
template<typename T >
constexpr T CubbyFlow::HalfPI ()
 PI/2 for type T. More...
 
template<>
constexpr float CubbyFlow::HalfPI< float > ()
 PI/2 for float. More...
 
template<>
constexpr double CubbyFlow::HalfPI< double > ()
 PI/2 for double. More...
 
template<typename T >
constexpr T CubbyFlow::QuarterPI ()
 PI/4 for type T. More...
 
template<>
constexpr float CubbyFlow::QuarterPI< float > ()
 PI/4 for float. More...
 
template<>
constexpr double CubbyFlow::QuarterPI< double > ()
 PI/4 for double. More...
 
template<typename T >
constexpr T CubbyFlow::TwoPI ()
 2*PI for type T. More...
 
template<>
constexpr float CubbyFlow::TwoPI< float > ()
 2*PI for float. More...
 
template<>
constexpr double CubbyFlow::TwoPI< double > ()
 2*PI for double. More...
 
template<typename T >
constexpr T CubbyFlow::FourPI ()
 4*PI for type T. More...
 
template<>
constexpr float CubbyFlow::FourPI< float > ()
 4*PI for float. More...
 
template<>
constexpr double CubbyFlow::FourPI< double > ()
 4*PI for double. More...
 
template<typename T >
constexpr T CubbyFlow::InvPI ()
 1/PI for type T. More...
 
template<>
constexpr float CubbyFlow::InvPI< float > ()
 1/PI for float. More...
 
template<>
constexpr double CubbyFlow::InvPI< double > ()
 1/PI for double. More...
 
template<typename T >
constexpr T CubbyFlow::InvTwoPI ()
 1/2*PI for type T. More...
 
template<>
constexpr float CubbyFlow::InvTwoPI< float > ()
 1/2*PI for float. More...
 
template<>
constexpr double CubbyFlow::InvTwoPI< double > ()
 1/2*PI for double. More...
 
template<typename T >
constexpr T CubbyFlow::InvFourPI ()
 1/4*PI for type T. More...
 
template<>
constexpr float CubbyFlow::InvFourPI< float > ()
 1/4*PI for float. More...
 
template<>
constexpr double CubbyFlow::InvFourPI< double > ()
 1/4*PI for double. More...
 

Variables

constexpr size_t CubbyFlow::ZERO_SIZE = 0
 Zero size_t. More...
 
constexpr ssize_t CubbyFlow::ZERO_SSIZE = 0
 Zero ssize_t. More...
 
constexpr size_t CubbyFlow::ONE_SIZE = 1
 One size_t. More...
 
constexpr ssize_t CubbyFlow::ONE_SSIZE = 1
 One ssize_t. More...
 
constexpr float CubbyFlow::PI_FLOAT = 3.14159265358979323846264338327950288f
 Float-type PI. More...
 
constexpr double CubbyFlow::PI_DOUBLE = 3.14159265358979323846264338327950288
 Double-type PI. More...
 
constexpr float CubbyFlow::HALF_PI_FLOAT = 1.57079632679489661923132169163975144f
 Float-type PI/2. More...
 
constexpr double CubbyFlow::HALF_PI_DOUBLE = 1.57079632679489661923132169163975144
 Double-type PI/2. More...
 
constexpr float CubbyFlow::QUARTER_PI_FLOAT = 0.785398163397448309615660845819875721f
 Float-type PI/4. More...
 
constexpr double CubbyFlow::QUARTER_PI_DOUBLE = 0.785398163397448309615660845819875721
 Double-type PI/4. More...
 
constexpr float CubbyFlow::TWO_PI_FLOAT = static_cast<float>(2.0 * PI_DOUBLE)
 Float-type 2*PI. More...
 
constexpr double CubbyFlow::TWO_PI_DOUBLE = 2.0 * PI_DOUBLE
 Double-type 2*PI. More...
 
constexpr float CubbyFlow::FOUR_PI_FLOAT = static_cast<float>(4.0 * PI_DOUBLE)
 Float-type 4*PI. More...
 
constexpr double CubbyFlow::FOUR_PI_DOUBLE = 4.0 * PI_DOUBLE
 Double-type 4*pi. More...
 
constexpr float CubbyFlow::INV_PI_FLOAT = static_cast<float>(1.0 / PI_DOUBLE)
 Float-type 1/PI. More...
 
constexpr double CubbyFlow::INV_PI_DOUBLE = 1.0 / PI_DOUBLE
 Double-type 1/PI. More...
 
constexpr float CubbyFlow::INV_TWO_PI_FLOAT = static_cast<float>(0.5 / PI_DOUBLE)
 Float-type 1/2*PI. More...
 
constexpr double CubbyFlow::INV_TWO_PI_DOUBLE = 0.5 / PI_DOUBLE
 Double-type 1/2*PI. More...
 
constexpr float CubbyFlow::INV_FOUR_PI_FLOAT = static_cast<float>(0.25 / PI_DOUBLE)
 Float-type 1/4*PI. More...
 
constexpr double CubbyFlow::INV_FOUR_PI_DOUBLE = 0.25 / PI_DOUBLE
 Double-type 1/4*PI. More...
 
constexpr float CubbyFlow::GRAVITY_FLOAT = -9.8f
 Gravity. More...
 
constexpr double CubbyFlow::GRAVITY = -9.8
 
constexpr float CubbyFlow::WATER_DENSITY_FLOAT = 1000.0f
 Water density. More...
 
constexpr double CubbyFlow::WATER_DENSITY = 1000.0
 
constexpr float CubbyFlow::SPEED_OF_SOUND_IN_WATER_FLOAT = 1482.0f
 Speed of sound in water at 20 degrees Celsius. More...
 
constexpr double CubbyFlow::SPEED_OF_SOUND_IN_WATER = 1482.0
 
constexpr int CubbyFlow::DIRECTION_NONE = 0
 No direction. More...
 
constexpr int CubbyFlow::DIRECTION_LEFT = 1 << 0
 Left direction. More...
 
constexpr int CubbyFlow::DIRECTION_RIGHT = 1 << 1
 Right direction. More...
 
constexpr int CubbyFlow::DIRECTION_DOWN = 1 << 2
 Down direction. More...
 
constexpr int CubbyFlow::DIRECTION_UP = 1 << 3
 Up direction. More...
 
constexpr int CubbyFlow::DIRECTION_BACK = 1 << 4
 Back direction. More...
 
constexpr int CubbyFlow::DIRECTION_FRONT = 1 << 5
 Front direction. More...
 
constexpr int CubbyFlow::DIRECTION_ALL
 All direction. More...