I haven't learned this at school...
8.4345 is smaller than 8.435 hence should be written, with two decimals,
as 8.43.
8.94345 is smaller than 8.9435 hence should be written, with three
decimals, as 8.943.
paul
PS: (I think what you seem to apply is that the 5 brings one up which
brings the next up etc... I don't think that this is valid)
majoko@gmx.com wrote:
> Hi!
> I have a problem with MathUtils.round();
> As I've learned at school I round
>
> 8.4345 to 8.44 with 2 decimal places or
> 8.94345 to 8.944 with 3 decimal places.
>
> If I use MathUtils.round()
> the results will be
> 8.43 with MathUtils.round(8.4345,2) or
> 8.943 MathUtils.round(8.94345,2)
>
> Has someone made the same experience?
>
> Kind regards,
>
> Markus
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
|