Scala Float >=(x: Float) 方法示例
如果第一个浮点值大于或等于指定的第二个双精度值,则使用>=(x: Float)方法返回 true。
Method Definition: (First_Float_Value).>=(Second_Float_Value)
Return Type: It returns true if the first float value is greater than or equal to the specified second float value.
示例 #1:
// Scala program of Float >=(x: Float)
// method
// Creating object
object GfG
{
// Main method
def main(args:Array[String])
{
// Applying >=(x: Float) function
val result = (100.0).>=(60.0)
// Displays output
println(result)
}
}
输出:
true
示例 #2:
// Scala program of Float >=(x: Float)
// method
// Creating object
object GfG
{
// Main method
def main(args:Array[String])
{
// Applying >=(x: Float) function
val result = (10.0).>=(60.0)
// Displays output
println(result)
}
}
输出:
false