createNormalized method

P createNormalized({
  1. double gray = 0.0,
})

Creates a new pixel with the given channel value normalized to the range [0.0, 1.0].

The gray value is optional.

If omitted, the channel value is set to 0.0.

Example

// Creating a full gray pixel.
final pixel = grayscale.createNormalized(gray: 1.0);

Implementation

P createNormalized({double gray = 0.0}) {
  return copyWithNormalized(zero, gray: gray);
}