瀏覽代碼

Address code review: improve TwoPi constant definition

- Use std::numbers::pi_v<float> * 2.0F directly for TwoPi
- Makes the mathematical origin more explicit

Co-authored-by: djeada <[email protected]>
copilot-swe-agent[bot] 1 月之前
父節點
當前提交
fb22f5eb18
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      render/gl/render_constants.h

+ 1 - 1
render/gl/render_constants.h

@@ -4,7 +4,7 @@
 
 
 namespace Render::GL::MathConstants {
 namespace Render::GL::MathConstants {
 inline constexpr float Pi = std::numbers::pi_v<float>;
 inline constexpr float Pi = std::numbers::pi_v<float>;
-inline constexpr float TwoPi = 2.0F * Pi;
+inline constexpr float TwoPi = std::numbers::pi_v<float> * 2.0F;
 } // namespace Render::GL::MathConstants
 } // namespace Render::GL::MathConstants
 
 
 namespace Render::GL::VertexAttrib {
 namespace Render::GL::VertexAttrib {