Single.IsNegativeInfinity(Single) Método

Definición

Devuelve un valor que indica si el número especificado se evalúa como infinito negativo.

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

Parámetros

f
Single

Número de punto flotante de precisión sencilla.

Devoluciones

true es si f se evalúa como NegativeInfinity; de lo contrario, falsees .

Ejemplos

En el ejemplo de código siguiente se muestra el IsNegativeInfinity método .

// 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

Comentarios

Las operaciones de punto flotante vuelven NegativeInfinity a indicar una condición de desbordamiento.

Se aplica a

Consulte también