You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every angle is in turns: a whole circle is 1, a quarter turn 0.25, in every package (src/md/infrastructure/angles.md). The new package gt:turn gives sin, cos, sincos, tan, atan2 (in turns), asin, acos, wrap and the conversions from_degrees, to_degrees, from_radians, to_radians (docs/turn.md); a multiple of a quarter turn is exact (sincos(0.25) is (1, 0)), so a rotation by a quarter turn is an exact matrix. Degrees and radians remain only where a system, a file or a person gives them (a pen's tilt, SVG, CSS text, a COLR font, the PDF engine), converted once; tests/angles holds the rule. A program changes each of these calls (the direction and the zero of each are unchanged):
a count of quarter turns is named quarters, an angle turns: pdf.Stamp.turns -> pdf.Stamp.quarters, pdf.Page.turns -> pdf.Page.quarters, image.rotate(img, quarter_turns) -> image.rotate(img, quarters) (the values unchanged)
render.Video_Picture.rotation: an int of degrees (0, 90, 180, 270) -> an f32 of turns (0, 0.25, 0.5, 0.75)
ui.Exploded_View.yaw and .pitch, ui.Licence_Card_Look.rx and .ry, ui.licence_card_seal_reveal(rx, ry): degrees -> turns
ui.srgb_to_hsl, ui.hsl_to_srgb, ui.srgb_to_oklch, ui.oklch_to_srgb, ui.to_oklch, ui.from_oklch: the hue in degrees -> turns (CSS text keeps its degrees: color_parse and color_text convert)