From c16c8655784da3f7d1d20640ef0208a36bdeeaee Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Mon, 29 Aug 2016 11:45:41 +0200 Subject: Issue 4961/7: Remove complex{conjugate,divide,exp}, Offset::arg They are promoting aspects of Offset not well-suited to graphics. --- flower/include/offset.hh | 3 --- flower/offset.cc | 33 --------------------------------- 2 files changed, 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) { -- cgit v1.2.3