Corretta round
git-svn-id: svn://10.65.10.50/trunk@2583 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
d8eeddba98
commit
aeff220d55
@ -187,7 +187,12 @@ real& real::round (
|
|||||||
p = ipow10(prec);
|
p = ipow10(prec);
|
||||||
_dec *= p;
|
_dec *= p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_dec >= 0.0)
|
||||||
_dec = floorl(_dec + 0.5);
|
_dec = floorl(_dec + 0.5);
|
||||||
|
else
|
||||||
|
_dec = ceill(_dec - 0.5);
|
||||||
|
|
||||||
if (prec != 0)
|
if (prec != 0)
|
||||||
_dec /= p;
|
_dec /= p;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user