checkInside method

bool checkInside(
  1. double x,
  2. double y
)

Implementation

bool checkInside(double x, double y) {
  var distance = sqrt(pow((x - centerX), 2) + pow((y - centerY), 2));
  return distance <= padding;
}