Interface: Float Stay organized with collections Save and categorize content based on your preferences.
rules. Float
interface static
Primitive type representing a 64-bit IEEE floating point number.
Floats can be compared using the==,!=,>,<,>= and<= operators.
Floats support the arithmetic operators+,-,/,*, and%.
Floats can be negated using the- prefix.
String and integer values can be converted to float values using thefloat() function:
float("2.2") == 2.2float(2) == 2.0Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2019-12-03 UTC.