summaryrefslogtreecommitdiffstats
path: root/Help/guide/tutorial/Step11/MathFunctions/MathFunctions.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Help/guide/tutorial/Step11/MathFunctions/MathFunctions.cxx')
-rw-r--r--Help/guide/tutorial/Step11/MathFunctions/MathFunctions.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/Help/guide/tutorial/Step11/MathFunctions/MathFunctions.cxx b/Help/guide/tutorial/Step11/MathFunctions/MathFunctions.cxx
new file mode 100644
index 0000000..5351184
--- /dev/null
+++ b/Help/guide/tutorial/Step11/MathFunctions/MathFunctions.cxx
@@ -0,0 +1,18 @@
+
+#include "MathFunctions.h"
+#include <cmath>
+
+#ifdef USE_MYMATH
+# include "mysqrt.h"
+#endif
+
+namespace mathfunctions {
+double sqrt(double x)
+{
+#ifdef USE_MYMATH
+ return detail::mysqrt(x);
+#else
+ return std::sqrt(x);
+#endif
+}
+}