Scala Float isNegInfinity() method with example
Last Updated :
29 Oct, 2019
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:
object GfG
{
def main(args : Array[String])
{
val result = ( 8.9 ).isNegInfinity
println(result)
}
}
|
Example #2:
object GfG
{
def main(args : Array[String])
{
val result = (- 7.965 ).isNegInfinity
println(result)
}
}
|
Share your thoughts in the comments
Please Login to comment...