Use our own constants instead of M_PI, M_*, etc. (#1733)
These constants are not part of the standard. We instead use our own constexpr definitions in the filament::math namespace, as part of the scalar.h include.
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <math/vec4.h>
|
||||
#include <math/scalar.h>
|
||||
|
||||
using namespace filament::math;
|
||||
|
||||
@@ -27,7 +28,7 @@ protected:
|
||||
};
|
||||
|
||||
TEST_F(VecTest, Constexpr) {
|
||||
constexpr float a = M_PI;
|
||||
constexpr float a = F_PI;
|
||||
constexpr float2 Z2{};
|
||||
constexpr float2 A2 = a;
|
||||
constexpr float2 B2 = { a, a };
|
||||
|
||||
Reference in New Issue
Block a user