Sets quantity in normalized 0..1 form between the item's Min a Max values as defined by item's config(for Min 0 and Max 5000, setting 0.5 will result in value 2500)
См. определение в файле ItemBase.c строка 3407
3408 {
3409 float value_clamped =
Math.
Clamp(value, 0, 1);
3411 SetQuantity(result, destroy_config, destroy_forced);
3412 }
override void SetQuantity()
override int GetQuantityMin()
override int GetQuantityMax()
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static proto float Round(float f)
Returns mathematical round of value.
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'.
Перекрестные ссылки Math::Clamp(), GetQuantityMax(), GetQuantityMin(), Math::Lerp(), Math::Round() и SetQuantity().
Используется в FlammableBase::CalculateQuantity(), ConvertEnergyToQuantity() и SetCEBasedQuantity().