xNorm method

double xNorm(
  1. int imageWidth
)

Returns the x coordinate normalized to 0.0..1.0 relative to imageWidth.

Implementation

double xNorm(int imageWidth) => (x / imageWidth).clamp(0.0, 1.0);