Commit 9f677b72 authored by Flavio Medeiros's avatar Flavio Medeiros

Trying to make the source code more understandable by removing mixing of...

Trying to make the source code more understandable by removing mixing of ternary if statements with attributions.
parent 476af3c6
......@@ -380,7 +380,11 @@ flo_shift(mrb_state *mrb, mrb_value x, mrb_int width)
#if defined(_ISOC99_SOURCE)
val = trunc(val);
#else
val = val > 0 ? floor(val) : ceil(val);
if (val > 0){
val = floor(val);
} else {
val = ceil(val);
}
#endif
if (val == 0 && mrb_float(x) < 0) {
return mrb_fixnum_value(-1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment