Skip to content

Commit

Permalink
fix javacheckstyle again
Browse files Browse the repository at this point in the history
  • Loading branch information
patiences committed Aug 22, 2018
1 parent d6cf509 commit df710f0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions python/common/org/python/types/Float.java
Original file line number Diff line number Diff line change
Expand Up @@ -661,9 +661,12 @@ public org.python.Object __round__(org.python.Object ndigits) {
"Return True if the float instance is finite with integral value, and False otherwise.\n"
)
public org.python.Object is_integer() {
return org.python.types.Bool.getBool(this.value == Math.floor(this.value) && !Double.isInfinite(this.value));
if (this.value == Math.floor(this.value) && !Double.isInfinite(this.value)) {
return org.python.types.Bool.TRUE;
}
return org.python.types.Bool.FALSE;
}

@org.python.Method(
__doc__ = "float.hex() -> string\n\nReturn a hexadecimal representation of a floating-point number.\n>>> (-0.1).hex()\n'-0x1.999999999999ap-4'\n>>> 3.14159.hex()\n'0x1.921f9f01b866ep+1'"
)
Expand Down

0 comments on commit df710f0

Please sign in to comment.