use .f instead of .16e for floats
It doesn't write a trailing zero, but it's better than floats being all over your screen.
This commit is contained in:
parent
a158053ae9
commit
4b09baa0a0
1 changed files with 2 additions and 2 deletions
|
|
@ -252,8 +252,8 @@ proc nimIntToStr(x: int): string {.compilerRtl.} =
|
|||
|
||||
proc nimFloatToStr(x: float): string {.compilerproc.} =
|
||||
var buf: array [0..59, char]
|
||||
c_sprintf(buf, "%#.16e", x)
|
||||
return $buf
|
||||
c_sprintf(buf, "%#.f", x)
|
||||
result = $buf
|
||||
|
||||
proc nimInt64ToStr(x: int64): string {.compilerRtl.} =
|
||||
result = newString(sizeof(x)*4)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue