summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-02-01 03:12:21 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-02-01 03:12:21 +0000
commit73af1e949d5c017068e3f3fabb9e5260b91ffab0 (patch)
treeb87ecb9a91288193e781207cca394bd73dcfa21f /numeric.c
parent1af83e49971e5ca5fa1b0c80a12e7b34d9271cac (diff)
2000-02-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/numeric.c b/numeric.c
index 4b394f434b..40b30167ea 100644
--- a/numeric.c
+++ b/numeric.c
@@ -330,8 +330,7 @@ flo_modulo(x, y, modulo)
result = value1 - value2 * value;
}
#endif
- if (modulo &&
- (RFLOAT(x)->value < 0.0) != (result < 0.0) && result != 0.0) {
+ if (modulo && value*result<0.0) {
result += value;
}
return rb_float_new(result);