fix example

This commit is contained in:
ge 2024-12-22 05:37:42 +03:00
parent 57c308d011
commit 25a1b7bbf0

View File

@ -7,12 +7,12 @@ import dataunits
fn main() { fn main() {
kilobytes := dataunits.convert(500, dataunits.mbit, dataunits.kb) kilobytes := dataunits.convert(500, dataunits.mbit, dataunits.kb)
println(kilobytes) // 62500 println(kilobytes) // 62500.0
mebibytes := (dataunits.gib * 15).mib() mebibytes := (dataunits.gib * 15).mib()
println(mebibytes) // 15360 println(mebibytes) // 15360.0
bytes := dataunits.DataSize(2000 * dataunits.gib).bytes() bytes := dataunits.DataSize(2000 * dataunits.gib).bytes()
println(bytes) // 4.294967296e+12 == 4294967296000 println(bytes) // 2.147483648e+12 == 2147483648000
} }
``` ```