Skip to content

Commit 2da66b1

Browse files
committed
COMP: Fix compiler errors on MSVC
1 parent 0467d90 commit 2da66b1

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

Source/Test/FundamentalSectorGeometryTest.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include <catch2/catch.hpp>
22

33
#include "EbsdLib/Utilities/FundamentalSectorGeometry.hpp"
4+
#include "EbsdLib/Math/EbsdLibMath.h"
45

56
#include <cmath>
67

@@ -88,7 +89,7 @@ TEST_CASE("ebsdlib::FundamentalSectorGeometry::PolarCoordinates", "[EbsdLib][Fun
8889
Vec3 interior = normalize({0.3, 0.1, 1.0});
8990
auto [radius, rho] = sector.polarCoordinates(interior);
9091
REQUIRE(rho >= 0.0);
91-
REQUIRE(rho < 2.0 * M_PI);
92+
REQUIRE(rho < ebsdlib::constants::k_2PiD);
9293
}
9394
}
9495

@@ -166,7 +167,7 @@ TEST_CASE("ebsdlib::FundamentalSectorGeometry::CorrectAzimuthalAngle", "[EbsdLib
166167
{
167168
// The corrected angle should increase monotonically with input angle
168169
double prev = 0.0;
169-
for(double rho = 0.01; rho < 2.0 * M_PI - 0.01; rho += 0.05)
170+
for(double rho = 0.01; rho < ebsdlib::constants::k_2PiD - 0.01; rho += 0.05)
170171
{
171172
double corrected = sector.correctAzimuthalAngle(rho);
172173
REQUIRE(corrected >= prev - 0.01); // monotonic (with small tolerance)
@@ -178,7 +179,7 @@ TEST_CASE("ebsdlib::FundamentalSectorGeometry::CorrectAzimuthalAngle", "[EbsdLib
178179
{
179180
double corrected = sector.correctAzimuthalAngle(-0.5);
180181
REQUIRE(corrected >= 0.0);
181-
REQUIRE(corrected < 2.0 * M_PI + 0.01);
182+
REQUIRE(corrected < ebsdlib::constants::k_2PiD + 0.01);
182183
}
183184
}
184185

Source/Test/ImageCropTest.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
#include <cstdint>
1616
#include <vector>
17+
#include <array>
1718

1819
using namespace ebsdlib;
1920

0 commit comments

Comments
 (0)