getOffsetAngleFormTargetIndex method

double getOffsetAngleFormTargetIndex(
  1. int index
)

Implementation

double getOffsetAngleFormTargetIndex(int index) {
  double targetItemAngle = getItemAngle(index) + baseAngleOffset;

  double offsetAngle = targetItemAngle % 180;
  if (targetItemAngle < 180 || targetItemAngle > 360) {
    offsetAngle = offsetAngle - 180;
  }

  return offsetAngle;
}