mirror of
https://github.com/Xevion/RimWorld-Hydroponics-Expanded.git
synced 2025-12-08 12:08:22 -06:00
21 lines
806 B
C#
21 lines
806 B
C#
namespace HydroponicsExpanded.Utility {
|
|
public static class BetweenExtension {
|
|
public static bool Between(this float value, float min, float max, bool inclusive = false) {
|
|
if (inclusive)
|
|
return value >= min && value <= max;
|
|
return value > min && value < max;
|
|
}
|
|
|
|
public static bool Between(this double value, double min, double max, bool inclusive = false) {
|
|
if (inclusive)
|
|
return value >= min && value <= max;
|
|
return value > min && value < max;
|
|
}
|
|
|
|
public static bool Between(this int value, int min, int max, bool inclusive = false) {
|
|
if (inclusive)
|
|
return value >= min && value <= max;
|
|
return value > min && value < max;
|
|
}
|
|
}
|
|
} |