summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2025-03-14 01:21:22 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2025-03-14 01:21:25 +0000
commit1ae4e65747de258d922aff4f31d4e3d03ad7ef84 (patch)
tree7efbecbe49aec9006d1cb531e604b488db7e379d /lib
parentMerge branch 'culling' (diff)
downloadilt-1ae4e65747de258d922aff4f31d4e3d03ad7ef84.tar.bz2
ilt-1ae4e65747de258d922aff4f31d4e3d03ad7ef84.tar.xz
ilt-1ae4e65747de258d922aff4f31d4e3d03ad7ef84.zip
Fix ratio to include return type in common intermediary type
Diffstat (limited to 'lib')
-rw-r--r--lib/maths.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/maths.h b/lib/maths.h
index 2049c78..0afce98 100644
--- a/lib/maths.h
+++ b/lib/maths.h
@@ -317,7 +317,7 @@ template<Arithmetic R = float, Arithmetic Ta, Arithmetic Tb>
constexpr auto
ratio(const Ta valueA, const Tb valueB)
{
- using Common = std::common_type_t<Ta, Ta>;
+ using Common = std::common_type_t<Ta, Ta, R>;
return static_cast<R>((static_cast<Common>(valueA) / static_cast<Common>(valueB)));
}