[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Convert a bunch of C++ internals to degrees rather than radians (iss
From: |
dak |
Subject: |
Re: Convert a bunch of C++ internals to degrees rather than radians (issue 305380043 by address@hidden) |
Date: |
Tue, 30 Aug 2016 02:34:01 -0700 |
Reviewers: thomasmorley651, carl.d.sorensen_gmail.com,
https://codereview.appspot.com/305380043/diff/1/scm/lily-library.scm
File scm/lily-library.scm (right):
https://codereview.appspot.com/305380043/diff/1/scm/lily-library.scm#newcode779
scm/lily-library.scm:779: as rectangular coordinates @ode{(x-length .
y-length)}."
On 2016/08/29 22:15:39, thomasmorley651 wrote:
should be: @code
Acknowledged.
Will fix but without extra review. I suppose if we ever decide to print
all doc strings for Scheme functions, we will have a lot of fun of this
kind to sort out.
Description:
Convert a bunch of C++ internals to degrees rather than radians
Degrees make for more "predictable" results in graphics applications
when care is taken to work as exactly as possible in the vicinity of
multiples of 45 degrees.
This provides also functions ly:length, ly:directed and ly:angle to
Scheme in order to facilitate work in degrees there. A number of
operations relevant only to complex analysis/arithmetic rather than
vector operations are removed from the Offset type in order not to
encourage their use.
Contains commits:
Remove complex{conjugate,divide,exp}, Offset::arg
They are promoting aspects of Offset not well-suited to graphics.
Let make_partial_ellipse_boxes use degrees
Change rotations to degrees rather than radians
Or replace them with something not requiring angles altogether.
Simplify polar->rectangular
Add ly:length, ly:directed, ly:angle
Those are functions working on and/or producing coordinate pairs,
usually
based on angles expressed in degrees.
Add offset_directed (Real)
This converts an angle in degrees into a unit vector.
Make Offset::angle_degrees () deliver nicer angles
Multiples of 45 degrees should be returned exactly.
Please review this at https://codereview.appspot.com/305380043/
Affected files (+178, -63 lines):
M flower/include/offset.hh
M flower/offset.cc
M lily/arpeggio.cc
M lily/bezier.cc
M lily/include/bezier.hh
M lily/line-interface.cc
M lily/lookup.cc
M lily/slur-configuration.cc
M lily/slur-scoring.cc
M lily/stencil.cc
M lily/stencil-integral.cc
M lily/stencil-scheme.cc
M scm/lily-library.scm