1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

2000-02-01

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2000-02-01 03:12:21 +00:00
parent 1af83e4997
commit 73af1e949d
10 changed files with 219 additions and 137 deletions

View file

@ -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);