SA_Maths
Sapphire Suite's C++ Maths Library
Loading...
Searching...
No Matches
Constants.hpp
Go to the documentation of this file.
1// Copyright (c) 2023 Sapphire development team. All Rights Reserved.
2
3#pragma once
4
5#ifndef SAPPHIRE_MATHS_CONSTANTS_GUARD
6#define SAPPHIRE_MATHS_CONSTANTS_GUARD
7
18namespace SA
19{
20 namespace Maths
21 {
23 template <typename T = double>
24 static constexpr T Pi = T{ 3.1415926535897932384 };
25
27 template <typename T = double>
28 static constexpr T PiX2 = T{ 2.0 } *Pi<T>;
29
31 template <typename T = double>
32 static constexpr T PiOv2 = Pi<T> / T{ 2.0 };
33
35 template <typename T = double>
36 static constexpr T PiOv3 = Pi<T> / T{ 3.0 };
37
39 template <typename T>
40 static constexpr T PiOv4 = Pi<T> / T{ 4.0 };
41
43 template <typename T = double>
44 static constexpr T PiOv6 = Pi<T> / T{ 6.0 };
45
47 template <typename T = double>
48 static constexpr T DegToRad = Pi<T> / T{ 180.0 };
49
51 template <typename T = double>
52 static constexpr T RadToDeg = T{ 180.0 } / Pi<T>;
53 }
54}
55
56
59#endif // GUARD