roojs-all.js
[roojs1] / examples / math.html
index e69de29..6350166 100644 (file)
@@ -0,0 +1,41 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Array Grid Example</title>
+
+     <link rel="stylesheet" type="text/css" href="../../cssX/roojs-all.css"/>
+    <link rel="stylesheet" type="text/css" href="../../cssX/xtheme-slate.css"/>
+
+     <script type="text/javascript" src="../roojs-all.js"></script>   
+  
+    <script type="text/javascript" src="../Roo/util/Math.js"></script>
+    
+</head>
+<body>
+ <h1>Math utile example</h1>
+<p>This example shows how to create a grid from Array data.</p>
+<p>Note that the js is not minified so it is readable. See 
+ <script>
+ Roo.onReady(function() {
+     
+     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))
+    
+    });
+ </script>
+</div>
+</body>
+</html>