Scala 数据转换

(a/b*1.0).formatted("%.2f")

*1.0: 转化为double
formatted("%.2f"):保证两位小数

posted on 2018-08-13 21:18  KellyChen_hug&hope  阅读(222)  评论(0编辑  收藏  举报

导航