From 16a2d2cb8c7fac8a64b76856dd7c1af343957a21 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Mon, 29 Aug 2016 06:50:01 +0200 Subject: Issue 4961/4: Simplify polar->rectangular --- scm/lily-library.scm | 10 ++-------- 1 file 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 -- cgit v1.2.3