# HG changeset patch # User IBBoard # Date 1297613854 0 # Node ID e260fce130eba55d280332d31fbb64c9526db858 # Parent e0acabb9163347329f5607a34feb7e6ab6b87b7e * Remove deprecated version of maths code no-open-ticket diff -r e0acabb91633 -r e260fce130eb IBBoard.csproj --- a/IBBoard.csproj Wed Jan 26 20:22:35 2011 +0000 +++ b/IBBoard.csproj Sun Feb 13 16:17:34 2011 +0000 @@ -1,5 +1,5 @@ - - + + Local 9.0.30729 @@ -137,7 +137,6 @@ - diff -r e0acabb91633 -r e260fce130eb Lang/IBBMath.cs --- a/Lang/IBBMath.cs Wed Jan 26 20:22:35 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,105 +0,0 @@ -// This file (IBBMath.cs) is a part of the IBBoard project and is copyright 2009 IBBoard -// -// The file and the library/program it is in are licensed under the GNU LGPL license, either version 3 of the License or (at your option) any later version. Please see COPYING.LGPL for more information and the full license. -// - -using System; - -namespace IBBoard.Lang -{ - [Obsolete("Use IBBoard.CustomMeth.IBBMath instead")] - public enum RoundType - { - Up, - Down, - Banker, - UpToHalf, - DownToHalf, - BankerToHalf - } - - /// - /// IBBMath provides a number of custom Maths functions based on the core Math classes. - /// - [Obsolete("Use IBBoard.CustomMeth.IBBMath instead")] - public class IBBMath - { - /// - /// Rounds a number to the closest half, with a bias towards whole numbers. This is equivalent to 'round-to-even' in that - /// 0.25 is rounded down to 0.0 and 0.75 is rounded up to 1.0 so that a bias isn't introduced by rounding. - /// - /// - /// The to round to the nearest 0.5 - /// - /// - /// param rounded to the nearest 0.5 - /// - public static double RoundToHalf(double number) - { - return IBBoard.CustomMath.IBBMath.RoundToHalf(number); - } - - /// - /// Returns the largest whole or half number that is less than or equal to the specified number. - /// - /// - /// The to round to the nearest 0.5 - /// - /// - /// param rounded to the nearest 0.5 that is less than or equal to param - /// - public static double FloorToHalf(double number) - { - return IBBoard.CustomMath.IBBMath.FloorToHalf(number); - } - - /// - /// Returns the smallest whole or half number that is greater than or equal to the specified number. - /// - /// - /// The to round to the nearest 0.5 - /// - /// - /// param rounded to the nearest 0.5 that is greater than or equal to param - /// - public static double CeilToHalf(double number) - { - return IBBoard.CustomMath.IBBMath.CeilToHalf(number); - } - - /// - /// Returns the number rounded as defined by the roundType - /// - /// - /// The to round - /// - /// - /// The way in which number should be rounded - /// - /// - /// The rounded - /// - public static double Round(double number, RoundType roundType) - { - IBBoard.CustomMath.RoundType newRoundType = (IBBoard.CustomMath.RoundType) Enum.Parse(typeof(IBBoard.CustomMath.RoundType), roundType.ToString()); - return IBBoard.CustomMath.IBBMath.Round(number, newRoundType); - } - - /// - /// Returns the number rounded up or down to the closest whole number. - /// - /// - /// The to round - /// - /// - /// true to round up, else rounds down - /// - /// - /// The rounded - /// - public static double Round(double number, bool roundUp) - { - return IBBoard.CustomMath.IBBMath.Round(number, roundUp); - } - } -}