- Fixed some minor issues due to MSVC compat
This commit is contained in:
@@ -451,13 +451,13 @@ constexpr vector<genType, i...> trunc(const vector<genType, i...>& x)
|
||||
template<typename genType>
|
||||
constexpr genType roundEven(genType x)
|
||||
{
|
||||
const float e = numeric_limits<genType>::epsilon();
|
||||
float f = x - fennec::floor(x);
|
||||
const genType e = numeric_limits<genType>::epsilon();
|
||||
genType f = x - fennec::floor(x);
|
||||
if (fennec::abs(f - genType(0.5)) > e)
|
||||
return fennec::round(x);
|
||||
|
||||
float i = fennec::floor(x);
|
||||
float r = i / 2;
|
||||
genType i = fennec::floor(x);
|
||||
genType r = i / 2;
|
||||
bool up = r - fennec::floor(r) > e;
|
||||
return i + static_cast<genType>(up);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user