fix double precision problem
This commit is contained in:
@@ -55,7 +55,8 @@ namespace LibSernatur {
|
||||
* @return Returns a string of the percentage
|
||||
*/
|
||||
public static string format_double (double value) {
|
||||
return (value * 100).to_string () + "%";
|
||||
// Remove the double precision by converting to float
|
||||
return ((float) (value * (double) 100)).to_string () + "%";
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user