1.1 --- a/plugins/include/float.inc Wed May 23 07:23:24 2007 +0000
1.2 +++ b/plugins/include/float.inc Wed May 23 15:49:28 2007 +0000
1.3 @@ -213,21 +213,25 @@
1.4 native Float:ArcTangent2(Float:x, Float:y);
1.5
1.6 /**
1.7 - * Different methods of rounding.
1.8 + * Rounds a floating point number using the "round to nearest" algorithm.
1.9 + *
1.10 + * @param value Floating point value to round.
1.11 + * @return The value rounded to the nearest integer.
1.12 */
1.13 -enum floatround_method
1.14 +stock RoundFloat(Float:value)
1.15 {
1.16 - floatround_round = 0, /**< Standard IEEE rounding */
1.17 - floatround_floor, /**< Next lowest integer value. */
1.18 - floatround_ceil, /**< Next highest integer value. */
1.19 - floatround_tozero /** Closest integer to zero. */
1.20 -};
1.21 + return RoundToNearest(value);
1.22 +}
1.23
1.24 /**
1.25 - * Backwards compatibility - use RoundToNearest or any of the other rounding natives.
1.26 + * Backwards compatibility stock. Do not use.
1.27 + *
1.28 * @deprecated
1.29 */
1.30 -native FloatRound(Float:value, floatround_method:method=floatround_round);
1.31 +stock FloatRound(Float:value)
1.32 +{
1.33 + return RoundToNearest(value);
1.34 +}
1.35
1.36 /**
1.37 * User defined operators.