Sat, 14 Jun 2014 09:56:07 +0300
- minor edit
src/miscallenous.cc | file | annotate | diff | comparison | revisions |
--- a/src/miscallenous.cc Sat Jun 14 09:48:55 2014 +0300 +++ b/src/miscallenous.cc Sat Jun 14 09:56:07 2014 +0300 @@ -127,10 +127,10 @@ double mult = floor (abs<double> (value / snapvalue)); double out = mult * snapvalue; - if (abs<double> (value) - (mult * snapvalue) > snapvalue / 2) + if (abs (value) - (mult * snapvalue) > snapvalue / 2) out += snapvalue; - if (value < 0 && out != 0) + if (value < 0) out = -out; return out;