Length of an arc between two angles: Difference between revisions
Content added Content deleted
m (→{{header|Phix}}: added syntax colouring, marked p2js compatible) |
No edit summary |
||
Line 634: | Line 634: | ||
{{out}} |
{{out}} |
||
<pre>43.6332313</pre> |
<pre>43.6332313</pre> |
||
=={{header|Vlang}}== |
|||
{{trans|go}} |
|||
<lang vlang>import math |
|||
fn arc_length(radius f64, angle1 f64, angle2 f64) f64 { |
|||
return (360 - math.abs(angle2-angle1)) * math.pi * radius/180 |
|||
} |
|||
fn main() { |
|||
println(arc_length(10, 10, 120)) |
|||
}</lang> |
|||
{{out}} |
|||
<pre>43.633231299858</pre> |
|||
=={{header|Wren}}== |
=={{header|Wren}}== |