Generic InBetween Function.
- by Luiscencio
I am tired of writing x > min && x < max so i wawnt to write a simple function but I am not sure if I am doing it right... actually I am not cuz I get an error:
bool inBetween<T>(T x, T min, T max) where T:IComparable
{
return (x > min && x < max);
}
errors:
Operator '>' cannot be…