-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathmath.html
48 lines (30 loc) · 1.19 KB
/
math.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<html>
<head>
<title>MathCell & Math</title>
<link rel="stylesheet" type="text/css" href="style.css">
<style></style>
</head>
<body>
<script src="../../math/build/math.js"></script>
<script src="../build/mathcell.js"></script>
<p>A JavaScript library of special functions and common mathematical operations has been initiated, entitled simply <a href="https://github.com/paulmasson/math" target="_blank">Math</a>. It provides higher-level mathematics not available by default in JavaScript.</p>
<p>As an example, here are the first five Bessel functions of the first kind:</p>
<div class="mathcell" style="height: 4in">
<script>
var parent = document.scripts[ document.scripts.length - 1 ].parentNode;
var id = generateId();
parent.id = id;
MathCell( id, [] );
parent.update = function( id ) {
var data = [];
for ( var i = 0 ; i < 5 ; i++ )
data.push( plot( x => besselJ(i,x), [0, 10], { color: 'hsl(' + 72*i + ',100%,50%)' } ) );
var config = { type: 'svg' };
evaluate( id, data, config );
}
parent.update( id );
</script>
</div>
<p>Here is the complete list of mathematical <a href="https://paulmasson.github.io/math/docs/functions.html">functions</a> available in Math.</p>
</body>
</html>