View Single Post
Thrawn2
Veteran Member
Join Date: Apr 2009
Old 11-23-2011 , 16:17   Re: [TF2] Metal Calculator
Reply With Quote #2

Quote:
Originally Posted by gameguysz View Post
Need to figure out how to round to the nearest whole number otherwise the users have to round up every once in a while in the sub category.
http://docs.sourcemod.net/api/index....d=show&id=714&


PHP Code:
/**
 * Rounds a float to the closest integer to zero.
 *
 * @param value            Input value to be rounded.
 * @return                Rounded value.
 */
native RoundToZero(Float:value);

/**
 * Rounds a float to the next highest integer value.
 *
 * @param value            Input value to be rounded.
 * @return                Rounded value.
 */
native RoundToCeil(Float:value);

/**
 * Rounds a float to the next lowest integer value.
 *
 * @param value            Input value to be rounded.
 * @return                Rounded value.
 */
native RoundToFloor(Float:value);

/**
 * Standard IEEE rounding.
 *
 * @param value            Input value to be rounded.
 * @return                Rounded value.
 */
native RoundToNearest(Float:value); 
__________________
einmal mit profis arbeiten. einmal.
Thrawn2 is offline