自动转换到小数点后两位的柔性 [英] Automatic convert to two decimal in flex
本文介绍了自动转换到小数点后两位的柔性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我将值分配给其他变量这样的柔性Web应用程序。 this.X = _cord - 宽度;
I am assigning a value to other variable like this in flex web application. this.X = _cord - width ;
在调试器值(_cord - 宽)即将95.9995874156354。但分配后,它this.X它会自动转换为95.95。
In debugger value of (_cord - width) is coming 95.9995874156354. but after assigning it to this.X it automatically converts to 95.95.
请帮助我在此。
推荐答案
这是在Flash Player坐标的固有特征。一个坐标增量的最小值被称为缇和等于0.05。因此,使用比协调性与期望的precision存储值别的东西。
This is an inherent feature of coordinates in Flash player. The minimal value of a coordinate increment is called "twip" and equals 0.05. So, use something else than coordinate property to store values with desired precision.
这篇关于自动转换到小数点后两位的柔性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文