Length of an arc between two angles

From Rosetta Code
Revision as of 04:37, 15 March 2020 by rosettacode>Molo32 (Created page with "'''Task''' Calculate the length of the arc (green) between two angles; https://imgur.com/a/aYgDLxr It is important in video game programming implement a method that takes...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Task

Calculate the length of the arc (green) between two angles;

https://imgur.com/a/aYgDLxr

It is important in video game programming

implement a method that takes parameters like:

  • xpos of the circle
  • ypos of the circle
  • radius
  • ang1
  • ang2

return green arc_lenght

example method:

arc_lenght (xpos, ypos, radius, ang1, ang2) { return arc_lenght; }