summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kastrup <dak@gnu.org>2016-08-29 11:45:41 +0200
committerDavid Kastrup <dak@gnu.org>2016-09-05 19:07:09 +0200
commitc16c8655784da3f7d1d20640ef0208a36bdeeaee (patch)
tree5eb879e2571d6a056e889ed281f965d3eb8465ee
parent1f3023623452d4fc38570eba85853de499e31ca7 (diff)
Issue 4961/7: Remove complex{conjugate,divide,exp}, Offset::arg
They are promoting aspects of Offset not well-suited to graphics.
-rw-r--r--flower/include/offset.hh3
-rw-r--r--flower/offset.cc33
2 files changed, 0 insertions, 36 deletions
diff --git a/flower/include/offset.hh b/flower/include/offset.hh
index c6c166cc42..a8c5987801 100644
--- a/flower/include/offset.hh
+++ b/flower/include/offset.hh
@@ -111,7 +111,6 @@ public:
Offset direction () const;
Offset swapped () const;
- Real arg () const;
Real angle_degrees () const;
Real length () const;
bool is_sane () const;
@@ -124,8 +123,6 @@ IMPLEMENT_ARITHMETIC_OPERATOR (Offset, -);
IMPLEMENT_ARITHMETIC_OPERATOR (Offset, *);
Offset complex_multiply (Offset, Offset);
-Offset complex_divide (Offset, Offset);
-Offset complex_exp (Offset);
Offset offset_directed (Real);
inline Offset
diff --git a/flower/offset.cc b/flower/offset.cc
index cdb63f3f86..db1654f2d3 100644
--- a/flower/offset.cc
+++ b/flower/offset.cc
@@ -46,39 +46,6 @@ complex_multiply (Offset z1, Offset z2)
return z;
}
-Offset
-complex_conjugate (Offset o)
-{
- o[Y_AXIS] = -o[Y_AXIS];
- return o;
-}
-
-Offset
-complex_divide (Offset z1, Offset z2)
-{
- z2 = complex_conjugate (z2);
- Offset z = complex_multiply (z1, z2);
- z *= 1 / z2.length ();
- return z;
-}
-
-Offset
-complex_exp (Offset o)
-{
- Real s = sin (o[Y_AXIS]);
- Real c = cos (o[Y_AXIS]);
-
- Real r = exp (o[X_AXIS]);
-
- return Offset (r * c, r * s);
-}
-
-Real
-Offset::arg () const
-{
- return atan2 (coordinate_a_[Y_AXIS], coordinate_a_[X_AXIS]);
-}
-
static inline Real
atan2d (Real y, Real x)
{