示例#1
0
		/// <summary>
		/// Approximate the decimal value accurate to a precision of 0.000001m
		/// </summary>
		/// <param name="value">decimal value to approximate</param>
		/// <returns>an approximation of the value as a rational number</returns>
		/// <remarks>
		/// http://stackoverflow.com/questions/95727
		/// </remarks>
		public static Rational<T> Approximate(decimal value)
		{
			return Rational<T>.Approximate(value, 0.000001m);
		}