Update moduloOrZero.cpp

This commit is contained in:
alexey-milovidov 2020-07-21 17:06:40 +03:00 committed by GitHub
parent 16ba0f91d7
commit b358c796f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,7 +16,7 @@ struct ModuloOrZeroImpl
{
if constexpr (std::is_floating_point_v<ResultType>)
{
return ResultType(a) - floor(ResultType(a) / ResultType(b)) * ResultType(b);
return ResultType(a) - trunc(ResultType(a) / ResultType(b)) * ResultType(b);
}
else
{