summaryrefslogtreecommitdiff
path: root/src/mainwin.cc
diff options
context:
space:
mode:
authorGiles Bathgate <gilesbathgate@gmail.com>2011-02-05 15:50:39 (GMT)
committerGiles Bathgate <gilesbathgate@gmail.com>2011-02-05 16:37:30 (GMT)
commit744367fda10a756de7da503ff833fe3d75bd3dfc (patch)
tree2c17b206b27f0821c1a5de444c52bd75d354c60a /src/mainwin.cc
parent1bc4fe5d4d7d12e9d1777221780c2ad6551aa9b0 (diff)
Proof of concept implementation of builtin constants.
Diffstat (limited to 'src/mainwin.cc')
-rw-r--r--src/mainwin.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mainwin.cc b/src/mainwin.cc
index 951c4f5..eeb7923 100644
--- a/src/mainwin.cc
+++ b/src/mainwin.cc
@@ -145,6 +145,8 @@ MainWindow::MainWindow(const QString &filename)
root_ctx.set_variable("$fa", Value(12.0));
root_ctx.set_variable("$t", Value(0.0));
+ root_ctx.set_constant("PI",Value(M_PI));
+
Value zero3;
zero3.type = Value::VECTOR;
zero3.append(new Value(0.0));
contact: Jan Huwald // Impressum