Reputation: 10250
canvas's arc method has the following syntax:
void ctx.arc(x, y, radius, startAngle, endAngle, anticlockwise);
I was just playing around with this example HERE.
and I just changed the startAngle to be (MATH.PI * 2 )
. Usually people use 0
for that parameter , so what difference does it make whether I use 0
or MATH.PI * 2
? Can anybody explain ?
Upvotes: 0
Views: 123
Reputation: 54
It makes no difference. They can be used interchangeably if you are drawing a complete circle i.e.
2 * Math.PI
Upvotes: 2
Reputation: 559
the function uses the radian measure - this measure is periodically to 2*MAHT.PI.
So, it makes no difference wheter you use 0, 2*Math.PI or any multiple of it (like 222*Math.PI)
Upvotes: 2