Single.IsNegativeInfinity(Single) Metodo
Definizione
Restituisce un valore che indica se il numero specificato restituisce l'infinito negativo.Returns a value indicating whether the specified number evaluates to negative infinity.
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
Parametri
- f
- Single
Numero a virgola mobile a precisione singola.A single-precision floating-point number.
Restituisce
true
se f
viene valutato in NegativeInfinity; in caso contrario, false
.true
if f
evaluates to NegativeInfinity; otherwise, false
.
Esempi
Nell'esempio di codice riportato di seguito viene illustrato il metodo IsNegativeInfinity.The following code example demonstrates the IsNegativeInfinity method.
// This will return true.
Console::WriteLine( "IsNegativeInfinity(-5.0F / 0) == {0}.", Single::IsNegativeInfinity( -5.0F / zero ) ? (String^)"true" : "false" );
// This will return true.
Console.WriteLine("IsNegativeInfinity(-5.0F / 0) == {0}.", Single.IsNegativeInfinity(-5.0F / 0) ? "true" : "false");
' 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
Commenti
Le operazioni a virgola mobile restituiscono NegativeInfinity per segnalare una condizione di overflow.Floating-point operations return NegativeInfinity to signal an overflow condition.