1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-15 22:50:24 +02:00

decoder/encoder;float precision doc

This commit is contained in:
Fei Ni
2017-06-11 16:28:31 +08:00
parent cdbad22d22
commit cee09816e3
3 changed files with 18 additions and 13 deletions

View File

@ -75,6 +75,8 @@ func (stream *Stream) WriteFloat64Lossy(val float64) {
}
}
// EnableLossyFloatMarshalling keeps 10**(-6) precision
// for float variables for better performance.
func EnableLossyFloatMarshalling() {
// for better performance
RegisterTypeEncoder("float32", func(ptr unsafe.Pointer, stream *Stream) {