aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/alnumeric.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/alnumeric.h b/common/alnumeric.h
index 94ea2ee0..b409ce9c 100644
--- a/common/alnumeric.h
+++ b/common/alnumeric.h
@@ -251,6 +251,8 @@ inline int float2int(float f) noexcept
return static_cast<int>(f);
#endif
}
+inline unsigned int float2uint(float f) noexcept
+{ return static_cast<unsigned int>(float2int(f)); }
/** Converts double-to-int using standard behavior (truncation). */
inline int double2int(double d) noexcept