It is a common knowledge about clockwise or counterclockwise, like this picture:
So when I read clockwise set to true it means it is clockwise, and if I read clockwise set to false it means counterclockwise. However, as you can read in the code below, I set clockwise to true, but the result is not correct.
Is it a wrong function coding from Apple?
Test code:
struct CircleShape: Shape {
func path(in rect: CGRect) -> Path {
return Path { path in
path.addArc(center: CGPoint(x: rect.midX, y: rect.midY), radius: 200,
startAngle: Angle(degrees: 0), endAngle: Angle(degrees: 90), clockwise: true)
}
}
}
Result:
As you can read in my code, I set clockwise for true, starting from 0 and end for 90, but the output is for clockwise: false
which is not what I understand from clockwise or counterclockwise. Is it not confusing behavior? Or, I am missing something in between?