[Kst] branches/work/kst/portto4/kst/src/libkstmath
Barth Netterfield
netterfield at astro.utoronto.ca
Tue Aug 16 20:44:48 UTC 2011
SVN commit 1247738 by netterfield:
Step function was not implemented (!) Now it is.
M +9 -0 enodes.cpp
--- branches/work/kst/portto4/kst/src/libkstmath/enodes.cpp #1247737:1247738
@@ -378,7 +378,15 @@
return 1.0/cos(x);
}
+static double step(double x) {
+ if (x>0.0) {
+ return 1.0;
+ } else {
+ return 0.0;
+ }
+}
+
static struct {
const char *name;
double (*func)(double);
@@ -401,6 +409,7 @@
{"sin", &sin},
{"sinh", &sinh},
{"sqrt", &sqrt},
+ {"step", &step},
{"tan", &tan},
{"tanh", &tanh},
{0, 0}
More information about the Kst
mailing list