Skip to content

Commit b268685

Browse files
committed
Fix build errors
1 parent 2917025 commit b268685

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/pstack/calc/rotations.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ const std::array<geo::matrix3<float>, 32> arbitrary_rotations = [] {
1515
std::mt19937 gen(rd());
1616
std::uniform_real_distribution<float> dis(0, 2 * geo::pi);
1717
for (std::size_t i = 6; i != 32; ++i) {
18-
out[i] = geo::rot3_z(geo::radians{dis(gen)})
19-
* geo::rot3_y(geo::radians{dis(gen)})
20-
* geo::rot3_x(geo::radians{dis(gen)});
18+
out[i] = geo::rot3_z<float>(geo::radians{dis(gen)})
19+
* geo::rot3_y<float>(geo::radians{dis(gen)})
20+
* geo::rot3_x<float>(geo::radians{dis(gen)});
2121
}
2222
return out;
2323
}();

src/pstack/geo/functions.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ struct radians;
1818
struct degrees;
1919

2020
struct radians {
21-
explicit radians(double val) : value(val) {}
22-
radians(degrees d);
21+
explicit constexpr radians(double val) : value(val) {}
22+
constexpr radians(degrees d);
2323
double value;
2424
};
2525
struct degrees {
26-
explicit degrees(double val) : value(val) {}
27-
degrees(radians r);
26+
explicit constexpr degrees(double val) : value(val) {}
27+
constexpr degrees(radians r);
2828
double value;
2929
};
3030

31-
inline radians::radians(degrees d) : value(d.value * (pi / 180)) {}
32-
inline degrees::degrees(radians r) : value(r.value * (180 / pi)) {}
31+
constexpr radians::radians(degrees d) : value(d.value * (pi / 180)) {}
32+
constexpr degrees::degrees(radians r) : value(r.value * (180 / pi)) {}
3333

3434
constexpr double sin(radians r) {
3535
double x = r.value;

0 commit comments

Comments
 (0)