clamp method

BrushExtent clamp(
  1. double minBound,
  2. double maxBound
)

Clamps the extent to the given bounds.

Implementation

BrushExtent clamp(double minBound, double maxBound) {
  return BrushExtent(
    start.clamp(minBound, maxBound),
    end.clamp(minBound, maxBound),
  );
}