#pragma once #include "Types.hpp" namespace TSE { /// @brief definition of PI for the engine constexpr float TSE_PI = 3.14159265358979323846f; /// @brief the epsilon used as min float value for comparisons in the engine constexpr float TSE_EPSILON = 1e-6f; /// @brief 32-bit golden ratio constant used for hash mixing constexpr uint TSE_HASH_GOLDEN_RATIO_32 = 0x9e3779b9u; /// @brief a simple degrees to radiant conversion function /// @param deg the degrees value /// @return the radiant value inline float Deg2Rad(const float& deg) { return deg * (TSE_PI / 180.0f); } /// @brief a simple radiant to degrees conversion function /// @param rad the radiant value /// @return the degrees value inline float Rad2Deg( const float& rad) { return rad * (180.0f / TSE_PI); } } // namespace TSE