JASS Help

MathRealClamp

native MathRealClamp takes [[[real|real.html]]] value, [[[real|real.html]]] min, [[[real|real.html]]] max returns [[[real|real.html]]]

Возвращает число в диапазоне между min и max.

function [[[main|main.html]]] takes [[[nothing|nothing.html]]] returns [[[nothing|nothing.html]]] call ConsolePrint([[[R2S|r2s.html]]](MathRealClamp(-3, -1, 1))) // -1.000 call ConsolePrint([[[R2S|r2s.html]]](MathRealClamp(-2, -3, 2))) // -2.000 call ConsolePrint([[[R2S|r2s.html]]](MathRealClamp(5, -1, 3))) // 3.000 endfunction
Last modified: 22 October 2024