Skip to content

Commit 29f8a93

Browse files
Changing output of 'getRationalNumberValue' from float to double
1 parent 0ad1a95 commit 29f8a93

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>de.redstoneworld.redutilities</groupId>
88
<artifactId>redutilities</artifactId>
9-
<version>0.0.11-Snapshot</version>
9+
<version>0.0.12-Snapshot</version>
1010

1111
<properties>
1212
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

src/main/java/de/redstoneworld/redutilities/misc/Formatter.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ public static String getTimeString(long timestamp, String format) {
3333

3434
/**
3535
* This method reforms the rational number spelling and convert it
36-
* to a float number. Flexible inputs are allowed, which improves
36+
* to a double number. Flexible inputs are allowed, which improves
3737
* the usability.
3838
*
3939
* @param cmdInput the rational number with one of all supported spellings
40-
* @return (float) the formatted rational number (decimal value)
40+
* @return (double) the formatted rational number (decimal value)
4141
*/
42-
public static float getRationalNumberValue(String cmdInput) {
42+
public static double getRationalNumberValue(String cmdInput) {
4343

4444
// replace decimal separator of DE
4545
cmdInput = cmdInput.replace(",", ".");
@@ -50,8 +50,8 @@ public static float getRationalNumberValue(String cmdInput) {
5050
cmdInput = cmdInput.replace(".", "0.");
5151
}
5252

53-
// convert the string to a float number
54-
return Float.parseFloat(cmdInput);
53+
// convert the string to a double number
54+
return Double.parseDouble(cmdInput);
5555
}
5656

5757
/**

0 commit comments

Comments
 (0)