isEdge method

bool isEdge(
  1. Vec pos
)

Whether pos is in the outermost edge of the circle.

Implementation

bool isEdge(Vec pos) {
  // Must be within the circle.
  if (!contains(pos)) return false;

  // But not within the next smallest circle inside it.
  if (radius > 0 && _contains(center, radius - 1, pos)) return false;

  return true;
}