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

@@ -73,7 +73,7 @@ namespace Nz
Vector2f origin = FromChipmunk(pos);
float r = static_cast<float>(radius);
RadianAnglef angleBetweenVertices = 2.f * float(M_PI) / vertices.size();
RadianAnglef angleBetweenVertices = 2.f * Pi<float> / vertices.size();
for (std::size_t i = 0; i < vertices.size(); ++i)
{
RadianAnglef angle = float(i) * angleBetweenVertices;