clamp method

  1. @override
int clamp(
  1. int pixel
)
override

Clamps a pixel to the valid range of values for the pixel format.

Implementation

@override
int clamp(int pixel) => pixel.clamp(0, length - 1);