25.02.2019, 10:32
Actually that is the perfect candidate for the ternary operator.
Besides that, you should forward Float Tag Functions.
Otherwise you had always to declare them, before you use them, for the sake of the compiler.
Besides that, you should forward Float Tag Functions.
Otherwise you had always to declare them, before you use them, for the sake of the compiler.
PHP Code:
forward Float:FloatClamp(Float:v, Float:min, Float:max);
stock Float:FloatClamp(Float:v, Float:min, Float:max)
{
return v < min ? min : (v > max ? max : v);
}