diff options
author | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2004-03-06 20:31:16 +0000 |
---|---|---|
committer | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2004-03-06 20:31:16 +0000 |
commit | c008748638679f10746c70a7f677c0e8906ffa9e (patch) | |
tree | e8d53c15a9184b19109453e56cf4fc8f8cfac6b0 /plugin_math.c | |
parent | 2f4f59ba2e28ee38f721f09ab6756fd4575b3f78 (diff) | |
download | lcd4linux-c008748638679f10746c70a7f677c0e8906ffa9e.tar.gz |
[lcd4linux @ 2004-03-06 20:31:16 by 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...
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@387 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'plugin_math.c')
-rw-r--r-- | plugin_math.c | 12 |
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); |