Simplyfied bounding value detection

This commit is contained in:
Michael Braun 2015-08-23 22:26:31 +02:00
parent 021c835b02
commit fc45d1216a

View File

@ -44,9 +44,9 @@ if (_barrelLength >= (_barrelLengthTable select _barrelLengthTableCount - 1)) ex
// Find closest bordering values for barrel length
{
if (_barrelLength >= _x && _barrelLength <= (_barrelLengthTable select _forEachIndex + 1)) then {
_lowerDataIndex = _forEachIndex;
_upperDataIndex = _lowerDataIndex + 1;
if (_barrelLength <= _x) then {
_upperDataIndex = _forEachIndex;
_lowerDataIndex = _upperDataIndex - 1;
breakTo "main";
};
} forEach _barrelLengthTable;