Length of an arc between two angles: Difference between revisions
no edit summary
MaiconSoft (talk | contribs) No edit summary |
|||
Line 27:
43.6332313
</pre>
=={{header|Delphi}}==
{{Trans|AWK}}
<lang Delphi>
program Length_of_an_arc;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils;
function arc_length(radius, angle1, angle2: Double): Double;
begin
Result := (360 - abs(angle2 - angle1)) * PI / 180 * radius;
end;
begin
Writeln(Format('%.7f'#10, [arc_length(10, 10, 120)]));
Readln;
end.
</lang>
{{out}}
<pre>
43.6332313
</pre>
=={{header|Factor}}==
<lang factor>USING: kernel math math.constants math.trig prettyprint ;
|