summaryrefslogtreecommitdiff
path: root/lib/maths.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-11-26 20:21:12 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-11-26 20:21:12 +0000
commit239b3ab10b460da34c490a7e06a21c984e21ffb6 (patch)
tree4ce09f5d091ffbcf063a9d0fc076659dfe9e3142 /lib/maths.h
parentDon't run the app by default (diff)
downloadilt-239b3ab10b460da34c490a7e06a21c984e21ffb6.tar.bz2
ilt-239b3ab10b460da34c490a7e06a21c984e21ffb6.tar.xz
ilt-239b3ab10b460da34c490a7e06a21c984e21ffb6.zip
Enable all Jason Turner recommended warnings
Diffstat (limited to 'lib/maths.h')
-rw-r--r--lib/maths.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/maths.h b/lib/maths.h
index 285c69a..18332b7 100644
--- a/lib/maths.h
+++ b/lib/maths.h
@@ -69,7 +69,7 @@ template<typename R = float, typename Ta, typename Tb>
inline constexpr auto
rdiv(Ta a, Tb b)
{
- return ((R)a / (R)b);
+ return (static_cast<R>(a) / static_cast<R>(b));
}
constexpr inline glm::vec2
@@ -105,14 +105,14 @@ float find_arcs_radius(glm::vec2 start, glm::vec2 ad, glm::vec2 end, glm::vec2 b
// Conversions
template<typename T>
-inline constexpr float
+inline constexpr auto
mph_to_ms(T v)
{
return v / 2.237;
}
template<typename T>
-inline constexpr float
+inline constexpr auto
kph_to_ms(T v)
{
return v / 3.6;