fix double precision problem

This commit is contained in:
2019-01-16 12:22:02 -03:00
parent 346be0e9ac
commit a0d1af51c4
2 changed files with 4 additions and 1 deletions

View File

@@ -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 () + "%";
}
}