06.04.2015, 01:57
Is there anyway i can just round off to a higer value always. I tried other methods in roundoff param. But none worked. I want that if i floatround (1.1) it returns it as (2.0) !
stock Roundup(Float: val) {
return floatround(val, floatround_round);
}
Try
pawn Код:
|
new result = 0;
new items = 50;
new Float:value = items / 15.0;
if((floatround((items / 15))) >= value)
{
result = floatround((items / 15));
}
else
{
result = floatround((items / 15)) + 1;
}
floatround(items/15, floatround_ceil);
https://sampwiki.blast.hk/wiki/Floatround
https://sampwiki.blast.hk/wiki/Floatround_method pawn Код:
|
main()
{
printf("%d", floatround(38/15, floatround_ceil));
}
2