atFraction method

List<int> atFraction(
  1. double fx,
  2. double fy
)

The pixel at fractional position (fx, fy) in 0..1 of the image.

Implementation

List<int> atFraction(double fx, double fy) => at(
  (fx * (width - 1)).round().clamp(0, width - 1),
  (fy * (height - 1)).round().clamp(0, height - 1),
);