private void ValidateDoubleRange(ref double val, String propName, double min, double max, double def, bool zeroOK)
{
if (zeroOK && val == 0.0) return;
if (val < min || val > max) {
String zero = (zeroOK) ? " or equal to 0" : String.Empty;
ConsoleError("^b" + propName + "^n must be greater than or equal to " + min + " and less than or equal to " + max + zero + ", was set to " + val + ", corrected to " + def);
val = def;
return;
}
}