Skip to content

src/core/constants.h

Namespaces

Name
dakku
dakku namespace

Source code

#ifndef DAKKU_CORE_CONSTANTS_H_
#define DAKKU_CORE_CONSTANTS_H_
#include <core/fwd.h>

#include <numbers>
#include <limits>

namespace dakku {

static constexpr float INF = std::numeric_limits<float>::infinity();

static constexpr float PI = std::numbers::pi_v<float>;

static constexpr float INV_PI =
    static_cast<float>(1.0 / std::numbers::pi_v<double>);

static constexpr float PI_OVER_2 =
    static_cast<float>(std::numbers::pi_v<double> / 2.0);

static constexpr float PI_OVER_4 =
    static_cast<float>(std::numbers::pi_v<double> / 4.0);

static constexpr float SHADOW_EPS = 1e-5f;

static constexpr float ONE_MINUS_EPSILON =
    1 - std::numeric_limits<float>::epsilon();

}  // namespace dakku
#endif

Updated on 2022-04-30 at 15:46:11 +0000