mathjs/test/test.html
2013-02-16 21:42:04 +01:00

24 lines
603 B
HTML

<!DOCTYPE html>
<html>
<head>
<title>Math2 Test</title>
<script src="../math2.js" type="text/javascript"></script>
</head>
<body>
<p>
Use the math2 library from the console...
</p>
<script>
var Complex = math2.type.Complex;
var Unit = math2.type.Unit;
var complex1 = new Complex(3, -4);
console.log(complex1.toString());
console.log('sqrt(25) = ' + math2.sqrt(25));
console.log('sqrt(' + complex1.toString() + ') = ' + math2.sqrt(complex1));
console.log('sqrt(-4) = ' + math2.sqrt(-4));
</script>
</body>
</html>