Method ApplyMinMax
ApplyMinMax(int, int?, int?)
Applies minimum and maximum to the value if limitations are not null
.
public static int ApplyMinMax(int value, int? min = null, int? max = null)
Parameters
value
intValue to which min and max limits are applied.
min
int?Minimal value. Optional.
max
int?Maximal value. Optional.
Returns
- int
Value with applied min and max limits.
ApplyMinMax(double, double?, double?)
Applies minimum and maximum to the value if limitations are not null
.
public static double ApplyMinMax(double value, double? min = null, double? max = null)
Parameters
value
doubleValue to which min and max limits are applied.
min
double?Minimal value. Optional.
max
double?Maximal value. Optional.
Returns
- double
Value with applied min and max limits.