OGLplus
(0.59.0)
a C++ wrapper for rendering APIs
eagine
math
constants.hpp
Go to the documentation of this file.
1
#ifndef EAGINE_MATH_CONSTANTS_HPP
9
#define EAGINE_MATH_CONSTANTS_HPP
10
11
#include <cmath>
12
13
namespace
eagine::math
{
14
19
20
#ifdef M_PI
21
static
constexpr
const
auto
pi
= M_PI;
22
#else
23
static
constexpr
const
auto
pi
= 3.14159265358979323846;
24
#endif
25
30
31
static
const
auto
phi
= (1.0 + std::sqrt(5.0)) * 0.5;
32
33
}
// namespace eagine::math
34
35
#endif // EAGINE_MATH_CONSTANTS_HPP
eagine::math::pi
static constexpr const auto pi
The pi constant.
Definition:
constants.hpp:23
eagine::math
Math-related code is placed in this namespace.
Definition:
eagine.hpp:48
eagine::math::phi
static const auto phi
The phi constant.
Definition:
constants.hpp:31
Copyright © 2015-2021
Matúš Chochlík
.
<
chochlik -at -gmail.com
>
Documentation generated on Tue Apr 13 2021 by
Doxygen
(version 1.8.17).