changeset 98:e260fce130eb

* Remove deprecated version of maths code no-open-ticket
author IBBoard <dev@ibboard.co.uk>
date Sun, 13 Feb 2011 16:17:34 +0000
parents e0acabb91633
children 2597803a79c4
files IBBoard.csproj Lang/IBBMath.cs
diffstat 2 files changed, 2 insertions(+), 108 deletions(-) [+]
line wrap: on
line diff
--- 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 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
     <ProjectType>Local</ProjectType>
     <ProductVersion>9.0.30729</ProductVersion>
@@ -137,7 +137,6 @@
     <Compile Include="Lang\TranslationLoadException.cs" />
     <Compile Include="Xml\XmlTools.cs" />
     <Compile Include="IO\BinaryReaderBigEndian.cs" />
-    <Compile Include="Lang\IBBMath.cs" />
     <Compile Include="CustomMath\IBBMath.cs" />
     <Compile Include="Limits\NumericSizeConstrainedLimit.cs" />
     <Compile Include="Limits\SimpleRoundedPercentageLimit.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
-	}
-
-	/// <summary>
-	/// IBBMath provides a number of custom Maths functions based on the core Math classes.
-	/// </summary>
-	[Obsolete("Use IBBoard.CustomMeth.IBBMath instead")]
-	public class IBBMath
-	{
-		/// <summary>
-		/// 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.
-		/// </summary>
-		/// <param name="number">
-		/// The <see cref="System.Double"/> to round to the nearest 0.5
-		/// </param>
-		/// <returns>
-		/// <code>param</code> rounded to the nearest 0.5
-		/// </returns>
-		public static double RoundToHalf(double number)
-		{
-			return IBBoard.CustomMath.IBBMath.RoundToHalf(number);
-		}
-		
-		/// <summary>
-		/// Returns the largest whole or half number that is less than or equal to the specified number.
-		/// </summary>
-		/// <param name="number">
-		/// The <see cref="System.Double"/> to round to the nearest 0.5
-		/// </param>
-		/// <returns>
-		/// <code>param</code> rounded to the nearest 0.5 that is less than or equal to <code>param</code>
-		/// </returns>
-		public static double FloorToHalf(double number)
-		{
-			return IBBoard.CustomMath.IBBMath.FloorToHalf(number);
-		}
-		
-		/// <summary>
-		/// Returns the smallest whole or half number that is greater than or equal to the specified number.
-		/// </summary>
-		/// <param name="number">
-		/// The <see cref="System.Double"/> to round to the nearest 0.5
-		/// </param>
-		/// <returns>
-		/// <code>param</code> rounded to the nearest 0.5 that is greater than or equal to <code>param</code>
-		/// </returns>
-		public static double CeilToHalf(double number)
-		{
-			return IBBoard.CustomMath.IBBMath.CeilToHalf(number);
-		}
-
-		/// <summary>
-		/// Returns the number rounded as defined by the <code>roundType</code>
-		/// </summary>
-		/// <param name="number">
-		/// The <see cref="System.Double"/> to round
-		/// </param>
-		/// <param name="roundType">
-		/// The way in which <code>number</code> should be rounded
-		/// </param>
-		/// <returns>
-		/// The rounded <see cref="System.Double"/>
-		/// </returns>
-		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);
-		}
-		
-		/// <summary>
-		/// Returns the number rounded up or down to the closest whole number.
-		/// </summary>
-		/// <param name="number">
-		/// The <see cref="System.Double"/> to round
-		/// </param>
-		/// <param name="roundUp">
-		/// <code>true</code> to round up, else rounds down
-		/// </param>
-		/// <returns>
-		/// The rounded <see cref="System.Double"/>
-		/// </returns>
-		public static double Round(double number, bool roundUp)
-		{
-			return IBBoard.CustomMath.IBBMath.Round(number, roundUp);
-		}
-	}
-}