Single.NegativeInfinity 字段

定义

表示负无穷。 此字段为常数。

public: float NegativeInfinity = -Infinity;
public const float NegativeInfinity = -Infinity;
val mutable NegativeInfinity : single
Public Const NegativeInfinity As Single  = -Infinity

字段值

Value = -Infinity

示例

下面的代码示例演示 常 NegativeInfinity 量。

// This will equal Infinity.
Console::WriteLine( "10.0 minus NegativeInfinity equals {0}.", (10.0 - Single::NegativeInfinity) );
// This will equal Infinity.
Console.WriteLine("10.0 minus NegativeInfinity equals {0}.", (10.0 - Single.NegativeInfinity).ToString());
// This will equal Infinity.
printfn $"10.0 minus NegativeInfinity equals {10f - Single.NegativeInfinity}."
' This will equal Infinity.
Console.WriteLine("10.0 minus NegativeInfinity equals " + (10 - Single.NegativeInfinity).ToString() + ".")

注解

此常量的值是将负数除以零的结果。

当操作的结果小于 MinValue时,将返回此常量。

用于 IsNegativeInfinity 确定值的计算结果是否为负无穷大。

适用于

另请参阅