Math: Replace M_PI defines with template constexpr constants

This commit is contained in:
Jérôme Leclercq
2021-06-05 16:35:15 +02:00
parent df8b4b59e3
commit bd1f5214b8
9 changed files with 27 additions and 45 deletions

View File

@@ -915,7 +915,7 @@ namespace Nz
Matrix4<T>& Matrix4<T>::MakePerspective(RadianAngle<T> angle, T ratio, T zNear, T zFar)
{
// https://docs.microsoft.com/fr-fr/windows/win32/direct3d10/d3d10-d3dxmatrixperspectivefovrh
angle = RadianAngle<T>(M_PI_2) - angle / T(2.0);
angle = RadianAngle<T>(HalfPi<T>) - angle / T(2.0);
T yScale = angle.GetTan();