2
0

Fix precision loss for test format geometric types

fixes #399
This commit is contained in:
Jack Christensen
2018-03-17 10:26:03 -05:00
parent a07b87eb8b
commit cb4431028c
14 changed files with 45 additions and 16 deletions
+4 -1
View File
@@ -138,7 +138,10 @@ func (src *Path) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) {
if i > 0 {
buf = append(buf, ',')
}
buf = append(buf, fmt.Sprintf(`(%f,%f)`, p.X, p.Y)...)
buf = append(buf, fmt.Sprintf(`(%s,%s)`,
strconv.FormatFloat(p.X, 'f', -1, 64),
strconv.FormatFloat(p.Y, 'f', -1, 64),
)...)
}
return append(buf, endByte), nil