orbit method

void orbit(
  1. Point origin,
  2. double arcWidth,
  3. double arcHeight,
  4. double degrees,
)

Implementation

void orbit(Point origin, double arcWidth, double arcHeight, double degrees) {
  double radians = degrees * (math.pi / 180);
  x = origin.x + arcWidth * math.cos(radians);
  y = origin.y + arcHeight * math.sin(radians);
}