Isle
Loading...
Searching...
No Matches
tglvector.h
Go to the documentation of this file.
1#ifndef _tglVector_h
2#define _tglVector_h
3
4#include "math.h" // sin() in RotateAroundY()
5
6#include <stddef.h> // offsetof()
7
8namespace Tgl
9{
10
16namespace Constant
17{
23const double Pi = 3.14159265358979323846;
24};
25
32inline double DegreesToRadians(double degrees)
33{
34 return Constant::Pi * (degrees / 180.0);
35}
36
43inline double RadiansToDegrees(double radians)
44{
45 return (radians / Constant::Pi) * 180.0;
46}
47
53typedef float FloatMatrix4[4][4];
54
55} // namespace Tgl
56
57#endif /* _tglVector_h */
[AI] Contains mathematical constants used throughout the Tgl namespace.
const double Pi
[AI] Mathematical constant representing π (pi), the ratio of a circle's circumference to its diameter...
Definition: tglvector.h:23
[AI] Namespace containing all classes related to the 3D graphics abstraction/rendering engine.
float FloatMatrix4[4][4]
[AI] Represents a 4x4 matrix of single-precision floating point values.
Definition: tglvector.h:53
double DegreesToRadians(double degrees)
[AI] Converts an angle from degrees to radians.
Definition: tglvector.h:32
double RadiansToDegrees(double radians)
[AI] Converts an angle from radians to degrees.
Definition: tglvector.h:43