Ext.Number.correctFloat
Doc里是这样说的:
Corrects floating point numbers that overflow to a non-precise
value because of their floating nature,for example
0.1+0.2
修正浮点数,由于它们的浮动性质(天性),会溢出到非精确值,
比如0.1+0.2
可以试一下 js中0.1+0.2 是等于0.3000000004的, 这个不奇怪. 见
bigDecimal 那个博文
这个函数把他修正. = 0.3 .
也可以toFixed . 但可能会损失精度