// Convert the floating pointer number of alpha to an integer in the range [0, 256),// with an equal distribution across all 256 values.int alphaComponent = static_cast<int>(clampTo<double>(alpha, 0.0, 1.0) * nextafter(256.0, 0.0));