summaryrefslogtreecommitdiffstats
path: root/src/2geom
diff options
context:
space:
mode:
Diffstat (limited to 'src/2geom')
-rw-r--r--src/2geom/conjugate_gradient.cpp5
-rw-r--r--src/2geom/conjugate_gradient.h12
-rw-r--r--src/2geom/convex-cover.h2
-rw-r--r--src/2geom/elliptical-arc.cpp2
-rw-r--r--src/2geom/generic-rect.h2
5 files changed, 17 insertions, 6 deletions
diff --git a/src/2geom/conjugate_gradient.cpp b/src/2geom/conjugate_gradient.cpp
index ae69d5281..588513414 100644
--- a/src/2geom/conjugate_gradient.cpp
+++ b/src/2geom/conjugate_gradient.cpp
@@ -36,6 +36,9 @@
/* lifted wholely from wikipedia. */
+namespace Geom
+{
+
using std::valarray;
static void
@@ -126,6 +129,8 @@ conjugate_gradient(valarray<double> const &A,
// x is solution
}
+} // namespace Geom
+
/*
Local Variables:
mode:c++
diff --git a/src/2geom/conjugate_gradient.h b/src/2geom/conjugate_gradient.h
index a34307d4b..4f500c0e6 100644
--- a/src/2geom/conjugate_gradient.h
+++ b/src/2geom/conjugate_gradient.h
@@ -29,11 +29,14 @@
*
*/
-#ifndef _CONJUGATE_GRADIENT_H
-#define _CONJUGATE_GRADIENT_H
+#ifndef _2GEOM_CONJUGATE_GRADIENT_H
+#define _2GEOM_CONJUGATE_GRADIENT_H
#include <valarray>
+namespace Geom
+{
+
double
inner(std::valarray<double> const &x,
std::valarray<double> const &y);
@@ -44,7 +47,10 @@ conjugate_gradient(std::valarray<double> const &A,
std::valarray<double> const &b,
unsigned n, double tol,
unsigned max_iterations, bool ortho1);
-#endif // _CONJUGATE_GRADIENT_H
+
+} // namespace Geom
+
+#endif // _2GEOM_CONJUGATE_GRADIENT_H
/*
Local Variables:
diff --git a/src/2geom/convex-cover.h b/src/2geom/convex-cover.h
index a0443e9dc..a5f95a5fb 100644
--- a/src/2geom/convex-cover.h
+++ b/src/2geom/convex-cover.h
@@ -163,7 +163,7 @@ unsigned find_bottom_right(ConvexHull const &a);
/*** Arbitrary transform operator.
* Take a convex hull and apply an arbitrary convexity preserving transform.
- * we should be concerned about singular tranforms here.
+ * we should be concerned about singular transforms here.
*/
template <class T> ConvexHull operator*(ConvexHull const &p, T const &m) {
ConvexHull pr;
diff --git a/src/2geom/elliptical-arc.cpp b/src/2geom/elliptical-arc.cpp
index 29e983ad4..d2cb0b707 100644
--- a/src/2geom/elliptical-arc.cpp
+++ b/src/2geom/elliptical-arc.cpp
@@ -360,7 +360,7 @@ EllipticalArc::pointAndDerivatives(Coord t, unsigned int n) const
for ( unsigned int i = 0; i < m; ++i )
{
result.push_back( ea->pointAtAngle(angle) );
- angle += M_PI/2;
+ angle += (_sweep ? M_PI/2 : -M_PI/2);
if ( !(angle < 2*M_PI) ) angle -= 2*M_PI;
}
m = nn / 4;
diff --git a/src/2geom/generic-rect.h b/src/2geom/generic-rect.h
index bb6f2d2b8..eb9705a4b 100644
--- a/src/2geom/generic-rect.h
+++ b/src/2geom/generic-rect.h
@@ -261,7 +261,7 @@ public:
expandBy(amount, amount);
}
/** @brief Expand the rectangle in both directions.
- * Note that this is different from scaling. Negative values wil shrink the
+ * Note that this is different from scaling. Negative values will shrink the
* rectangle. If <code>-x</code> is larger than
* half of the width, the X interval will contain only the X coordinate
* of the midpoint; same for height. */