summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mathfuncs_rcp.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/mathfuncs_rcp.h b/mathfuncs_rcp.h
index e540f76..0349cc8 100644
--- a/mathfuncs_rcp.h
+++ b/mathfuncs_rcp.h
@@ -97,19 +97,17 @@ namespace vecmathlib {
template<typename realvec_t>
realvec_t mathfuncs<realvec_t>::vml_remainder(realvec_t x, realvec_t y)
{
- // return x - rint(x / y) * y;
- realvec_t r = x / y;
- return y * (r - rint(r));
+ return x - rint(x / y) * y;
+ // realvec_t r = x / y;
+ // return y * (r - rint(r));
}
template<typename realvec_t>
realvec_t mathfuncs<realvec_t>::vml_fmod(realvec_t x, realvec_t y)
{
- // realvec_t r = fabs(x);
- // y = fabs(y);
- // return copysign(r - floor(r / y) * y, x);
- realvec_t r = x / y;
- return y * (r - trunc(r));
+ return x - y * trunc(x / y);
+ // realvec_t r = x / y;
+ // return y * (r - trunc(r));
}
}; // namespace vecmathlib
OpenPOWER on IntegriCloud