From: villberg Date: Mon, 23 Jun 2014 12:02:34 +0000 (+0000) Subject: refs #4994 X-Git-Tag: v1.29.0~264 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=c7b3e7149f579a63c15646b53376dde87b55bbae;p=simantics%2Fsysdyn.git refs #4994 git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@29690 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Environment.java b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Environment.java index a8c875d6..d3cfce24 100644 --- a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Environment.java +++ b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Environment.java @@ -100,6 +100,15 @@ final public class Environment implements IEnvironment, ISystem { return Math.exp(x); } + }); + model.functions.put("log", new Fn1(2) { + + @Override + public Object evaluate(IEnvironment environment, int argc) { + Double x = (Double)environment.getValue(0); + return Math.log(x); + } + }); model.functions.put("zidz", new Fn1(2) {