有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java如何使负数向下取整?

根据this question

Returns the closest long to the argument. The result is rounded to an integer by adding 1/2, taking the floor of the result, and casting the result to type long. In other words, the result is equal to the value of the expression:

(long)Math.floor(a + 0.5d)

这就意味着,它会结束

我该怎么把它整下来


共 (0) 个答案