Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /src/modules/bugs/functions/DRoundFunc.cc [000000] .. [081fbe] Maximize Restore

  Switch to side-by-side view

--- a
+++ b/src/modules/bugs/functions/DRoundFunc.cc
@@ -0,0 +1,21 @@
+#include <config.h>
+#include "DRoundFunc.h"
+#include <JRmath.h>
+
+using std::vector;
+
+#define T(args) (*args[0])
+#define NDIGITS(args) (*args[1])
+
+namespace bugs {
+
+    DRoundFunc::DRoundFunc () : ScalarFunction ("dround", 2)
+    {
+    }
+
+    double DRoundFunc::evaluate(vector<double const *> const &args) const
+    {
+	return(fprec(T(args), NDIGITS(args)));
+    }
+
+}