When center point, start point, and end point are given

When center point, start point, and end point are given, how can we find startPoint, startangle, endPoint, and endAngle?

I can’t remember if Three.js has a built-in feature or not.

  • startPoint – no need to find it, it is given
  • startAngle – use Math.atan2
  • endPoint – it is given
  • endAngle – use Math.atan2

Also, when dealing with angles:

  • you need to fix in advance where is your 0-th angle, this affects the data given to Math.atan2
  • you may need to adjust angles up or down by 2kπ, or you may need to invert angles