Scala Float isPosInfinity() method with example
Last Updated :
29 Oct, 2019
The isPosInfinity() method is utilized to return true if the Float value or the specified float value is positive infinity number, or false otherwise.
Method Definition: (Float_Number).isPosInfinity
Return Type: It returns true if the Float value or the specified float value is positive infinity number, or false otherwise.
Example #1:
object GfG
{
def main(args : Array[String])
{
val result = ( 7.965 ).isPosInfinity
println(result)
}
}
|
Example #2:
object GfG
{
def main(args : Array[String])
{
val result = ( 0.0 / 0.0 ).isPosInfinity
println(result)
}
}
|
Share your thoughts in the comments
Please Login to comment...