[core] Use constexpr when possible

Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
This commit is contained in:
x7z4w
2025-10-24 08:36:38 +00:00
parent 936e05283c
commit 42f059f8f7
90 changed files with 258 additions and 259 deletions

View File

@@ -14,7 +14,7 @@ void UpdateNormalBetweenSegments(LineSegment * segment1, LineSegment * segment2)
float const dotProduct = glsl::dot(segment1->m_leftNormals[EndPoint], segment2->m_leftNormals[StartPoint]);
float const absDotProduct = fabs(dotProduct);
float const kEps = 1e-5;
float constexpr kEps = 1e-5;
if (fabs(absDotProduct - 1.0f) < kEps)
{
@@ -22,7 +22,7 @@ void UpdateNormalBetweenSegments(LineSegment * segment1, LineSegment * segment2)
return;
}
float const kMaxScalar = 5;
float constexpr kMaxScalar = 5;
float const crossProduct = glsl::cross(glsl::vec3(segment1->m_tangent, 0), glsl::vec3(segment2->m_tangent, 0)).z;
if (crossProduct < 0)
{