Commit 5636519
committed
Fix issues with arcs.
Adding 360 degrees to the computed theta1 if theta1 is negative and
independently doing the same for theta2 is incorrect. For example, if
theta1 is negative, but theta2 is positive, then that can result in
theta1 being greater than theta2 and give an unintended result, and is
inconsistent with the JSXGraph result in this case. What should happen
is that 360 be added to theta2 if theta2 is less than or equal to
theta1, and theta1 should never be modified. This gives consistent
results with the JSXGraph arc in all cases (except the case below, and
that is made consistent with the JSXGraph change in this commit).
JSXGraph is not capable of drawing a 360 degree arc (i.e., the case that
an arc starts and ends at the same point). So if the start and end
point are the same, then move the end point back around the circle a
tiny amount so that JSXGraph will draw the entire circle.1 parent 04bfedd commit 5636519
2 files changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
575 | 575 | | |
576 | 576 | | |
577 | 577 | | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
578 | 584 | | |
579 | 585 | | |
580 | 586 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
567 | 567 | | |
568 | 568 | | |
569 | 569 | | |
570 | | - | |
571 | | - | |
| 570 | + | |
572 | 571 | | |
573 | 572 | | |
574 | 573 | | |
| |||
0 commit comments