Closed Eun closed 7 years ago
Radian is should be a float because why shouldn't it be allowed to go for 90 degrees (1.570796 radians)?
Practical Example: To draw a full circle you should use Pi:
context.Arc(100, 100, 75, 0, math.Pi*2, false)
Anyways please use MDN as reference since it is more exact and not outdated: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/arc
The CanvasRenderingContext2D.Rotate
method currently takes int
parameter in dom
package. It's documented to also use radians:
https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/rotate
We could fix that too, if you want to expand the scope of your PR @Eun.
LGTM @shurcooL
@shurcooL @dominikh Updated for CanvasRenderingContext2D.rotate
Hi @Eun, thanks for wanting to contribute!
Can you please provide some rationale for this change?
According to https://www.w3schools.com/tags/canvas_arc.asp,
arc
parameters are:Given
sAngle
,eAngle
are angles specified in radians, usingfloat64
makes sense to me.