Single.IsNegativeInfinity(Single) Metoda

Definice

Vrátí hodnotu určující, jestli se zadané číslo vyhodnotí jako záporné nekonečno.

public:
 static bool IsNegativeInfinity(float f);
public:
 static bool IsNegativeInfinity(float f) = System::Numerics::INumberBase<float>::IsNegativeInfinity;
public static bool IsNegativeInfinity(float f);
static member IsNegativeInfinity : single -> bool
Public Shared Function IsNegativeInfinity (f As Single) As Boolean

Parametry

f
Single

Jednopřesné číslo s plovoucí desetinnou čárkou.

Návraty

true pokud f je vyhodnoceno jako NegativeInfinity; jinak , false.

Implementuje

Příklady

Následující příklad kódu ukazuje metodu IsNegativeInfinity .

// This will return true.
Console.WriteLine("IsNegativeInfinity(-5.0F / 0) == {0}.", Single.IsNegativeInfinity(-5.0F / 0) ? "true" : "false");
// This will return true.
printfn $"IsNegativeInfinity(-5.0F / 0) == {Single.IsNegativeInfinity(-5f / 0f)}."
' This will return True.
Console.Write("IsNegativeInfinity(-5.0 / 0) = ")
If Single.IsNegativeInfinity(-5 / 0) Then
    Console.WriteLine("True.")
Else
    Console.WriteLine("False.")
End If

Poznámky

Operace s plovoucí desetinou čárkou se vrátí NegativeInfinity k signálu podmínky přetečení.

Platí pro

Viz také