round from float32 precision
This commit is contained in:
parent
c12e71af15
commit
f30fe2c2c4
1 changed files with 2 additions and 1 deletions
|
|
@ -317,5 +317,6 @@ func (labelPosition Position) GetPointOnRoute(route geo.Route, strokeWidth, labe
|
|||
|
||||
// TODO probably use math.Big
|
||||
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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue