Rhino.ScriptRuntime.ToInteger C# (CSharp) Method

ToInteger() public static method

public static ToInteger ( double d ) : double
d double
return double
		public static double ToInteger(double d)
		{
			// if it's NaN
			if (d != d)
			{
				return +0.0;
			}
			if (d == 0.0 || d == double.PositiveInfinity || d == double.NegativeInfinity)
			{
				return d;
			}
			if (d > 0.0)
			{
				return Math.Floor(d);
			}
			else
			{
				return System.Math.Ceiling(d);
			}
		}

Same methods

ScriptRuntime::ToInteger ( object val ) : double
ScriptRuntime::ToInteger ( object args, int index ) : double
ScriptRuntime