简体   繁体   中英

Automatic convert to two decimal in flex

I am assigning a value to other variable like this in flex web application. this.X = _cord - width ;

In debugger value of (_cord - width) is coming 95.9995874156354. but after assigning it to this.X it automatically converts to 95.95.

Please help me on this.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM