chalk icon indicating copy to clipboard operation
chalk copied to clipboard

Arc Argument order

Open srush opened this issue 1 year ago • 1 comments

I don't know how important this is, but should the arc function use the same direction (either clockwise or counterclockwise) irrespective of its arguments? For example,

dia = cat(
    [
        arc(1, 0, 90).show_origin(),
        arc(1, 90, 0).show_origin(),
        arc(1, 90, 360).show_origin(),
    ],
    unit_x,
    sep=0.5
)

produces test_arc but maybe the second arc should be the same as the third one?

Originally posted by @danoneata in https://github.com/danoneata/chalk/pull/96#discussion_r942250001

srush avatar Aug 10 '22 18:08 srush

I was thinking about this; maybe a clearer alternative would be for arc to just mirror ArcSegment's constructor? That is, specify an arc by its radius, starting angle and a difference (delta) angle (instead of the ending angle).

danoneata avatar Aug 10 '22 21:08 danoneata