roojs-all.js
[roojs1] / examples / math.html
index 1594ee7..6350166 100644 (file)
  
  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))
+    
     });