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

◆ Remap()

static float Math::Remap ( float inputMin,
float inputMax,
float outputMin,
float outputMax,
float inputValue,
bool clampedOutput = true )
inlinestaticprivate

Returns given value remaped from input range into output range.

Аргументы
inputMinfloat Minimal value of given input range
inputMaxfloat Maximal value of given input range
outputMinfloat Minimal value of given output range
outputMaxfloat Maximal value of given input range
inputValuefloat Value we want to remap
clampedOutput

p bool If value should stay in that range, otherwise it will be extrapolated

Возвращает
float - Remapped value

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

741 {
742 float tempValue = Math.InverseLerp(inputMin, inputMax, inputValue);
743 float remapped = Math.Lerp(outputMin, outputMax, tempValue);
744
745 if (clampedOutput)
746 return Math.Clamp(remapped, outputMin, outputMax);
747
748 return remapped;
749 }
void Math()
Определения EnMath.c:8

Перекрестные ссылки Math().

Используется в Environment::ProcessHeatComfort().