forked from grimalschi/calque
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
58 lines (52 loc) · 1.55 KB
/
index.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
49
50
51
52
53
54
55
56
57
58
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Calque</title>
<link rel="icon" type='image/png' href="favicon.png">
<link rel="stylesheet" href="style.css">
<script src="math.min.js"></script>
<script src="calque.js"></script>
<script>
window.onload = function () {
var input = document.getElementById('input');
var output = document.getElementById('output');
window.calque = new Calque(input, output);
input.focus();
}
</script>
</head>
<body>
<div class="interface">
<div class="output" id="output"></div>
<textarea class="input" id="input">## Calque
# Expressions
2 + 2 * 2
sqrt(3^2 + 4^2)
2 inch to cm
cos(45 deg)
# Variables
a = 25
b = a * 2
postal code = 1122
# Expression trees
animals:
cats = 2
dogs = 3
plants:
trees = 20
vegetables:
potatos = 10
carrots = 10
# Functions
pow2(x) = x ^ 2
pow2(6)
# Last result
2 * 2
last + 1
# Calque on GitHub: https://github.com/grimalschi/calque
# Using Math.js: https://github.com/josdejong/mathjs</textarea>
</div>
<a href="https://github.com/grimalschi/calque"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"></a>
</body>
</html>