How to retain two decimal points in flex using Math.Round
code:
txtTotal.text=Math.round((Number(txtRate.text)*Number(txtQuantity.text))).toString();
here the rate is a constant 1.1 and quantity is variable ie rate*quantity=1.1 * quantity
Instead of .toString()
, use .toFixed(2)
;