public bool IsAdaptableEnvironment(float temperature, float humidity, float baseTemperature, float baseHumidity) { float minRange = 0.9f; float maxRange = 1.1f; if (JUtil.IsRangeOf(temperature, baseTemperature * minRange, baseTemperature * maxRange) && JUtil.IsRangeOf(humidity, baseHumidity * minRange, baseHumidity * maxRange)) { return(true); } return(false); }