Length of an arc between two angles: Difference between revisions
Content added Content deleted
Alextretyak (talk | contribs) (Added 11l) |
|||
Line 9: | Line 9: | ||
Illustrate the use of your method by calculating the length of the major arc of a circle of radius 10 units, between angles of 10 and 120 degrees. |
Illustrate the use of your method by calculating the length of the major arc of a circle of radius 10 units, between angles of 10 and 120 degrees. |
||
=={{header|11l}}== |
|||
{{trans|Python}} |
|||
<lang 11l>F arc_length(r, angleA, angleB) |
|||
R (360.0 - abs(angleB - angleA)) * math:pi * r / 180.0 |
|||
print(arc_length(10, 10, 120))</lang> |
|||
{{out}} |
|||
<pre> |
|||
43.6332 |
|||
</pre> |
|||
=={{header|ALGOL W}}== |
=={{header|ALGOL W}}== |