How to deal with Number precision in Actionscript?

后端 未结 14 1230
自闭症患者
自闭症患者 2020-11-29 03:23

I have BigDecimal objects serialized with BlazeDS to Actionscript. Once they hit Actionscript as Number objects, they have values like:

140475.32 turns

14条回答
  •  迷失自我
    2020-11-29 04:10

    It seems more like a transport problem, the number being correct but the scale ignored. If the number has to be stored as a BigDecimal on the server you may want to convert it server side to a less ambiguous format (Number, Double, Float) before sending it.

提交回复
热议问题