function getNGonSideLength(sideLength, splitCounter) {
  if (splitCounter <= 0) {
    return sideLength;
  }

  const halfSide = sideLength / 2;

  // Liu Hui used the Gou Gu (Pythagorean theorem) theorem repetitively.
  const perpendicular = Math.sqrt((circleRadius ** 2) - (halfSide ** 2));
  const excessRadius = circleRadius - perpendicular;
  const splitSideLength = Math.sqrt((excessRadius ** 2) + (halfSide ** 2));

  return getNGonSideLength(splitSideLength, splitCounter - 1);
}
@param {number} sideLength
@param {number} splitCounter
@return {number}