aboutsummaryrefslogtreecommitdiffstats
path: root/plugin_math.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugin_math.c')
-rw-r--r--plugin_math.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/plugin_math.c b/plugin_math.c
index 88e1f65..6988a2b 100644
--- a/plugin_math.c
+++ b/plugin_math.c
@@ -1,4 +1,4 @@
-/* $Id: plugin_math.c,v 1.3 2004/03/03 03:47:04 reinelt Exp $
+/* $Id: plugin_math.c,v 1.4 2004/03/06 20:31:16 reinelt Exp $
*
* math plugin
*
@@ -22,6 +22,12 @@
*
*
* $Log: plugin_math.c,v $
+ * Revision 1.4 2004/03/06 20:31:16 reinelt
+ * Complete rewrite of the evaluator to get rid of the code
+ * from mark Morley (because of license issues).
+ * The new Evaluator does a pre-compile of expressions, and
+ * stores them in trees. Therefore it should be reasonable faster...
+ *
* Revision 1.3 2004/03/03 03:47:04 reinelt
* big patch from Martin Hejl:
* - use qprintf() where appropriate
@@ -119,8 +125,8 @@ static void my_max (RESULT *result, RESULT *arg1, RESULT *arg2)
int plugin_init_math (void)
{
// set some handy constants
- AddNumericVariable ("Pi", M_PI);
- AddNumericVariable ("e", M_E);
+ SetVariableNumeric ("Pi", M_PI);
+ SetVariableNumeric ("e", M_E);
// register some basic math functions
AddFunction ("sqrt", 1, my_sqrt);