update other chopPrecision
This commit is contained in:
parent
fed4bd2b9f
commit
597bc319bf
1 changed files with 2 additions and 1 deletions
|
|
@ -20,7 +20,8 @@ type SvgPathContext struct {
|
||||||
|
|
||||||
// TODO probably use math.Big
|
// TODO probably use math.Big
|
||||||
func chopPrecision(f float64) float64 {
|
func chopPrecision(f float64) float64 {
|
||||||
return math.Round(f*10000) / 10000
|
// bring down to float32 precision before rounding for consistency across architectures
|
||||||
|
return math.Round(float64(float32(f*10000)) / 10000)
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewSVGPathContext(tl *geo.Point, sx, sy float64) *SvgPathContext {
|
func NewSVGPathContext(tl *geo.Point, sx, sy float64) *SvgPathContext {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue