diff options
Diffstat (limited to 'graphics/asymptote/mathop.h')
-rw-r--r-- | graphics/asymptote/mathop.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/graphics/asymptote/mathop.h b/graphics/asymptote/mathop.h index 785f30d036..d51c5741eb 100644 --- a/graphics/asymptote/mathop.h +++ b/graphics/asymptote/mathop.h @@ -249,7 +249,7 @@ struct quotient { if(y == -1) return Negate(x); // Implementation-independent definition of integer division: round down Int q=x/y; - if(q >= 0 || y*q == x) return q; + if(!((x < 0)^(y < 0)) || y*q == x) return q; return q-1; } }; @@ -325,4 +325,3 @@ void interp(vm::stack *s) } // namespace run #endif //MATHOP_H - |