src/colors.h

changeset 250
2837b549e616
parent 206
654661eab7f3
child 264
76a025db4948
--- a/src/colors.h	Wed Jun 22 16:13:15 2022 +0300
+++ b/src/colors.h	Wed Jun 22 16:53:35 2022 +0300
@@ -82,7 +82,7 @@
 template<typename T>
 constexpr T luma(T r, T g, T b)
 {
-	return 0.2126 * r + 0.7152 * g + 0.0722 * b;
+	return static_cast<T>(0.2126 * r + 0.7152 * g + 0.0722 * b);
 }
 
 //! @brief Checks whether or not the specified color index is a direct color

mercurial