The isNegInfinity() method is utilized to return true if the Float value or the specified float value is negative infinity number, or false otherwise.
Method Definition: (Float_Number).isNegInfinity
Return Type: It returns true if the Float value or the specified float value is negative infinity number, or false otherwise.
Example #1:
// Scala program of Float isNegInfinity() // method // Creating object object GfG
{ // Main method
def main(args : Array[String])
{
// Applying isNegInfinity method
val result = ( 8.9 ).isNegInfinity
// Displays output
println(result)
}
} |
Output:
false
Example #2:
// Scala program of Float isNegInfinity() // method // Creating object object GfG
{ // Main method
def main(args : Array[String])
{
// Applying isNegInfinity method
val result = (- 7.965 ).isNegInfinity
// Displays output
println(result)
}
} |
Output:
false