DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ InRange()

bool InRange ( int min,
int max,
bool inclusive_min = true,
bool inclusive_max = true )
protected

Check whether integer falls into an inclusive range.

Аргументы
minint low end of range
maxint high end of range
Возвращает
bool True if this value is withing the set range
int num = 123;
bool test = num.InRange( 100, 150 );
Print(test);
>> s = true
proto void Print(void var)
Prints content of variable to console/log.

См. определение в файле EnConvert.c строка 84

85 {
86 if( ( !inclusive_min && value <= min ) || value < min )
87 return false;
88
89 if( ( !inclusive_max && value >= max ) || value > max )
90 return false;
91
92 return true;
93 }