test: add some attiribution from test function

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram
2017-12-26 13:30:29 +01:00
parent fbdfc250c7
commit e0f5294372

View File

@@ -11,6 +11,7 @@ func floatEquals(a, b float64) bool {
return false
}
// round helper from https://stackoverflow.com/questions/39544571/golang-round-to-nearest-0-05
func round(x, unit float64) float64 {
return float64(int64(x/unit+0.5)) * unit
}