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.cxx19
1 files changed, 19 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..0145300
--- /dev/null
+++ b/Help/guide/tutorial/Step11/MathFunctions/MathFunctions.cxx
@@ -0,0 +1,19 @@
+
+#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
+}
+}