3 ms·
From the article: In order to do evil things like convert raw bytes to floats, I chose to use the “unsafe” package FWIW you don't need unsafe to do th
by rogpeppe1 11y ago
From the article:
In order to do evil things like convert raw bytes to floats,
I chose to use the “unsafe” package
FWIW you don't need unsafe to do that. encoding/binary + http://golang.org/pkg/math/#Float64frombits http://golang.org/pkg/math/#Float64frombits will do the job just fine.