Double.NegativeInfinity 字段
定义
表示负无穷。Represents negative infinity. 此字段为常数。This field is constant.
public: double NegativeInfinity = -Infinity;
public const double NegativeInfinity = -Infinity;
val mutable NegativeInfinity : double
Public Const NegativeInfinity As Double = -Infinity
字段值
示例
下面的代码示例演示如何使用 NegativeInfinity:The following code example illustrates the use of NegativeInfinity:
// This will equal Infinity.
Console::WriteLine( "10.0 minus NegativeInfinity equals {0}.", (10.0 - Double::NegativeInfinity) );
// This will equal Infinity.
Console.WriteLine("10.0 minus NegativeInfinity equals {0}.", (10.0 - Double.NegativeInfinity).ToString());
' This will equal Infinity.
Console.WriteLine("10.0 minus NegativeInfinity equals " + (10 - Double.NegativeInfinity).ToString() + ".")
注解
此常量的值是负数除以零所得的结果。The value of this constant is the result of dividing a negative number by zero.
当操作的结果小于 Double.MinValue时,将返回此常数。This constant is returned when the result of an operation is less than Double.MinValue.
使用 IsNegativeInfinity 确定某个值是否计算为负无穷大。Use IsNegativeInfinity to determine whether a value evaluates to negative infinity.