mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-14 15:11:25 -07:00
Clarify strconv.append_* to strconv.write_*
This commit is contained in:
@@ -385,17 +385,17 @@ to_diagnostic_format_writer :: proc(w: io.Writer, val: Value, padding := 0) -> i
|
||||
// which we want for the diagnostic format.
|
||||
case f16:
|
||||
buf: [64]byte
|
||||
str := strconv.append_float(buf[:], f64(v), 'f', 2*size_of(f16), 8*size_of(f16))
|
||||
str := strconv.write_float(buf[:], f64(v), 'f', 2*size_of(f16), 8*size_of(f16))
|
||||
if str[0] == '+' && str != "+Inf" { str = str[1:] }
|
||||
io.write_string(w, str) or_return
|
||||
case f32:
|
||||
buf: [128]byte
|
||||
str := strconv.append_float(buf[:], f64(v), 'f', 2*size_of(f32), 8*size_of(f32))
|
||||
str := strconv.write_float(buf[:], f64(v), 'f', 2*size_of(f32), 8*size_of(f32))
|
||||
if str[0] == '+' && str != "+Inf" { str = str[1:] }
|
||||
io.write_string(w, str) or_return
|
||||
case f64:
|
||||
buf: [256]byte
|
||||
str := strconv.append_float(buf[:], f64(v), 'f', 2*size_of(f64), 8*size_of(f64))
|
||||
str := strconv.write_float(buf[:], f64(v), 'f', 2*size_of(f64), 8*size_of(f64))
|
||||
if str[0] == '+' && str != "+Inf" { str = str[1:] }
|
||||
io.write_string(w, str) or_return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user