new Skaits = Users / MAX_PER_CT
Page 103 :
http://www.compuphase.com/pawn/Pawn_Language_Guide.pdf
Code:
/ e1 / e2
Results in the division of e1 by e2. The result is truncated
to the nearest integral value that is less than or equal to the
quotient. Both negative and positive values are rounded down,
i.e. towards −∞.
For positive values, this should work :
PHP Code:
enum round_method {
round,
floor,
ceil
}
Divide( a , b , round_method:method = floor )
{
if( !b )
{
abort(AMX_ERR_DIVIDE, "Trying to divide by 0")
return 0 // ?
}
switch( method )
{
case floor:
{
return a / b
}
case ceil:
{
return a / b + !!(a % b)
}
case round:
{
return a / b + !!( 2 * (a % b) > b )
}
}
return 0
}
__________________