开发者

What's a java equivalent for std::round(double)?

In cpp file I have std::round(double)

Please can I know the equivalent code in Java

Edit: I am already using java.lang.Math.round(double) and getting match in 99% cases. But in some places iam ge开发者_StackOverflow社区tting mismatch. For example:

  • std::round(4816.5058) = 4816 and Math.round(4816.5058) = 4817
  • std::round(4466.49996) = 4467 and Math.round(4466.49997) = 4466


java.lang.Math.round(double)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜