offset method
Generates a random offset between min and max based on roughness.
The roughnessGain parameter can be used to amplify or reduce the
roughness effect for specific operations.
Implementation
double offset(double min, double max, [double roughnessGain = 1]) {
return roughness *
roughnessGain *
((randomizer.next() * (max - min)) + min);
}