Limiting double to 3 decimal places

前端 未结 8 2192
小鲜肉
小鲜肉 2020-11-27 04:38

This i what I am trying to achieve:

If a double has more than 3 decimal places, I want to truncate any decimal places beyond the third. (do not round.)



        
8条回答
提交回复
热议问题