Sun, 26 Jun 2022 20:27:04 +0300
pi is no longer a template
src/basics.h | file | annotate | diff | comparison | revisions | |
src/ldrawalgorithm.h | file | annotate | diff | comparison | revisions |
--- a/src/basics.h Sun Jun 26 20:26:09 2022 +0300 +++ b/src/basics.h Sun Jun 26 20:27:04 2022 +0300 @@ -108,8 +108,7 @@ } } -template<typename T = float> -constexpr std::enable_if_t<std::is_floating_point_v<T>, T> pi = static_cast<T>(M_PIl); +constexpr float pi = M_PIf; inline QSizeF sizeToSizeF(const QSize& size) {
--- a/src/ldrawalgorithm.h Sun Jun 26 20:26:09 2022 +0300 +++ b/src/ldrawalgorithm.h Sun Jun 26 20:27:04 2022 +0300 @@ -21,8 +21,8 @@ constexpr float circleAngle(unsigned int divisions, unsigned int i) { - constexpr float ofs = 0.5 * pi<>; - float factor = -2.0f * pi<> / static_cast<float>(divisions); + constexpr float ofs = 0.5 * pi; + float factor = -2.0f * pi / static_cast<float>(divisions); return static_cast<float>(i) * factor + ofs; }