Changed to smaller float
This commit is contained in:
@@ -28,9 +28,9 @@ func NameFromEmail(email string) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func RoundFloat(val float64, precision uint) float64 {
|
||||
ratio := math.Pow(10, float64(precision))
|
||||
return math.Round(val*ratio) / ratio
|
||||
func RoundFloat(val float32, precision uint) float32 {
|
||||
ratio := math.Pow(10, float64(precision))
|
||||
return float32(math.Round(float64(val)*ratio) / ratio)
|
||||
}
|
||||
|
||||
func MustRandToken(n int) string {
|
||||
|
||||
Reference in New Issue
Block a user