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

◆ NormalizedTemperature()

float NormalizedTemperature ( float temperature,
float lowerLimit = GameConstants.ENVIRO_LOW_TEMP_LIMIT,
float upperLimit = GameConstants.ENVIRO_HIGH_TEMP_LIMIT )
private

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

1715 {
1717 return 0.0;
1718
1720 return Math.Clamp(Math.InverseLerp(lowerLimit, GameConstants.ITEM_TEMPERATURE_NEUTRAL_ZONE_LOWER_LIMIT, temperature), -1.0, -0.1);
1721
1723 return Math.Clamp(Math.InverseLerp(GameConstants.ITEM_TEMPERATURE_NEUTRAL_ZONE_UPPER_LIMIT, upperLimit, temperature), 0.1, 1.0);
1724
1725 // neutral zone
1726 return 0.0;
1727 }
Определения EnMath.c:7
const float ITEM_TEMPERATURE_NEUTRAL_ZONE_UPPER_LIMIT
Определения 3_Game/constants.c:804
const float ITEM_TEMPERATURE_NEUTRAL_ZONE_LOWER_LIMIT
damage per second dealt to attachment by fire
Определения 3_Game/constants.c:803
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...

Перекрестные ссылки Math::Clamp(), Math::InverseLerp(), GameConstants::ITEM_TEMPERATURE_NEUTRAL_ZONE_LOWER_LIMIT и GameConstants::ITEM_TEMPERATURE_NEUTRAL_ZONE_UPPER_LIMIT.

Используется в BodyPartHeatProperties() и BodyPartHeatProperties().