summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kastrup <dak@gnu.org>2016-08-29 06:50:01 +0200
committerDavid Kastrup <dak@gnu.org>2016-09-05 19:07:09 +0200
commit16a2d2cb8c7fac8a64b76856dd7c1af343957a21 (patch)
tree01027ff366c8f00f62428f7fbaabbc5821822c4d
parentaca522d3460b83df6a893e9d0cc43378f7e97f6e (diff)
Issue 4961/4: Simplify polar->rectangular
-rw-r--r--scm/lily-library.scm10
1 files changed, 2 insertions, 8 deletions
diff --git a/scm/lily-library.scm b/scm/lily-library.scm
index 574b85437e..bbbe3cc53a 100644
--- a/scm/lily-library.scm
+++ b/scm/lily-library.scm
@@ -776,14 +776,8 @@ right (@var{dir}=+1)."
(define-public (polar->rectangular radius angle-in-degrees)
"Return polar coordinates (@var{radius}, @var{angle-in-degrees})
-as rectangular coordinates @ode{(x-length . y-length)}."
-
- (let ((complex (make-polar
- radius
- (degrees->radians angle-in-degrees))))
- (cons
- (real-part complex)
- (imag-part complex))))
+as rectangular coordinates @code{(x-length . y-length)}."
+ (ly:directed angle-in-degrees radius))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; string