maths: allow different types for samesign

This commit is contained in:
Danny Robson 2021-05-10 11:39:39 +10:00
parent e38cf27d6d
commit 7d3ae8bd8f

View File

@ -363,10 +363,10 @@ namespace cruft {
} }
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
template <typename T> template <typename A, typename B>
constexpr constexpr
bool bool
samesign (T a, T b) samesign (A &&a, B &&b)
{ {
return (a >= 0 && b >= 0) || (a <= 0 && b <= 0); return (a >= 0 && b >= 0) || (a <= 0 && b <= 0);
} }