X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=examples%2Fmath.html;h=6350166cefa86928b348081dfa4b1efd706c76ec;hb=fc32d3336ffe6a4ac93549dab21fd04b7d7056d3;hp=1594ee7e9049a4d5309f85f3b32684569aa97d44;hpb=72fe96646f720fd111325caaec2f5909da379cc0;p=roojs1 diff --git a/examples/math.html b/examples/math.html index 1594ee7e90..6350166cef 100644 --- a/examples/math.html +++ b/examples/math.html @@ -20,11 +20,18 @@ Roo.onReady(function() { - a = new Roo.util.Math("123",2); - c = a.add("334"); - document.write(c); - + a = new Roo.util.Math("123.004",5); + a = a.add("334.003"); + console.log("doing fixed"); + console.log(a.toFixed(3)); + console.log(a.toFixed(2)); + var qty = new Roo.util.Math(3,5) + + var am = qty.multiply('15.80'); + console.log(am) + console.log(am.toFixed(2)) + });