Loading...
Searching...
No Matches
Constants.hpp File Reference

Go to the source code of this file.

Namespaces

namespace  CubbyFlow
 

Functions

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

Variables

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