Ste*_*man 10 vb.net double rounding
如何将Double舍入到VB .NET中最接近的整数?
Chr*_*man 20
这是相当古老的,但接受的使用答案在Math.Truncate技术上是不正确的:截断向零,而不是向下.例如,-1.5舍入为-1而不是-2.
Math.Truncate
为了始终向下舍入,请使用Math.Floor.
Math.Floor
Jon*_*eet 8
我们在谈论VB.NET还是VB6?在VB.NET中使用Math.Truncate.
归档时间:
16 年,10 月 前
查看次数:
22033 次
最近记录:
7 年,2 月 前