[cairo] Shouldn't Cairo use/offer degrees rather than radians?

David Kastrup dak at gnu.org
Wed Jun 28 05:05:13 UTC 2017


David Kastrup <dak at gnu.org> writes:

> Lawrence D'Oliveiro <ldo at geek-central.gen.nz> writes:
>
>> On Tue, 27 Jun 2017 11:37:07 +0200, David Kastrup wrote:
>>
>>> Lawrence D'Oliveiro <ldo at geek-central.gen.nz> writes:
>>> 
>>>> Trig calculations are usually easier in radians.  
>>> 
>>> Nobody uses Taylor series for actual trig calculations.
>>
>> Not that I care. This is the kind of thing I care about:
>>
>>     arc_length = radius * angle
>>
>> That kind of calculation only makes sense if “angle” is in radians.
>
> cairo_rotate has nothing to do with arc lengths.

You'd have more of a point regarding cairo_arc.  However, the ability to
specify lengths of arcs as a length can be rectified by scaling
appropriately with pi/180 without drawbacks since the rasterizer does
not work along curved lines but only straight lines.

The inability to reliably draw a half circle that seamlessly connects
with another half circle under any rasterization seems more important in
my book.

-- 
David Kastrup



More information about the cairo mailing list