Skip to content

Commit b693250

Browse files
committed
use double instead of float
1 parent 58bdcf5 commit b693250

File tree

10 files changed

+212
-212
lines changed

10 files changed

+212
-212
lines changed

src/main/java/com/gargoylesoftware/css/dom/CSSValueImpl.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,14 +294,14 @@ public LexicalUnit.LexicalUnitType getLexicalUnitType() {
294294
return null;
295295
}
296296

297-
public void setFloatValue(final float floatValue) throws DOMException {
298-
value_ = LexicalUnitImpl.createNumber(null, floatValue);
297+
public void setDoubleValue(final double doubleValue) throws DOMException {
298+
value_ = LexicalUnitImpl.createNumber(null, doubleValue);
299299
}
300300

301-
public float getFloatValue() throws DOMException {
301+
public double getDoubleValue() throws DOMException {
302302
if (value_ instanceof LexicalUnit) {
303303
final LexicalUnit lu = (LexicalUnit) value_;
304-
return lu.getFloatValue();
304+
return lu.getDoubleValue();
305305
}
306306
throw new DOMExceptionImpl(
307307
DOMException.INVALID_ACCESS_ERR,

src/main/java/com/gargoylesoftware/css/parser/AbstractCSSParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,8 +558,8 @@ protected int intValue(final char op, final String s) {
558558
return result;
559559
}
560560

561-
protected float floatValue(final char op, final String s) {
562-
final float result = Float.parseFloat(s);
561+
protected double doubleValue(final char op, final String s) {
562+
final double result = Double.parseDouble(s);
563563
if (op == '-') {
564564
return -1 * result;
565565
}

src/main/java/com/gargoylesoftware/css/parser/LexicalUnit.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ enum LexicalUnitType {
9292
int getIntegerValue();
9393

9494
/**
95-
* @return the float value.
95+
* @return the double value.
9696
*/
97-
float getFloatValue();
97+
double getDoubleValue();
9898

9999
/**
100100
* @return the string representation of the unit.

0 commit comments

Comments
 (0)