[cairo] Shouldn't Cairo use/offer degrees rather than radians?
David Kastrup
dak at gnu.org
Fri Jun 30 20:49:39 UTC 2017
Bill Spitzak <spitzak at gmail.com> writes:
> Sorry I forgot to add:
>
> David may have a point, though it is not exactly what he is stating.
>
> Degrees have the property that "interesting" angles are more immune to
> data transformations than radians. float(90) == double(90), while
> float(M_PI_2) != double(M_PI_2).
The problem rather is that any M_PI_2 is not equal to pi/2. There is no
floating point number p2 for which cos(p2) == 0.0.
> This can mean that you get the expected sin and cos for "interesting"
> angles more often.
Well, more often than _zero_ times is not a high bar, is it?
> Where he is wrong is in thinking degrees make it easier to arrive at
> these integers from an angle. I don't think it makes any difference as
> you need to do an fmod or some equivalent in both cases.
So for what value of p is cos(p) == 0.0 ?
--
David Kastrup
More information about the cairo
mailing list