]> Cypherpunks repositories - gostls13.git/commitdiff
math/rand/v2: use max builtin in tests
authorTobias Klauser <tklauser@distanz.ch>
Wed, 15 May 2024 09:04:10 +0000 (11:04 +0200)
committerGopher Robot <gobot@golang.org>
Thu, 16 May 2024 01:44:46 +0000 (01:44 +0000)
Change-Id: I6d0050319c66fb62c817206e646e1a9449dc444c
Reviewed-on: https://go-review.googlesource.com/c/go/+/585715
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Robert Griesemer <gri@google.com>

src/math/rand/v2/rand_test.go

index d223180fb6105b12d29543bd3a44b77f13cb2138..e89ee29f6006065f05a164319237c7c602241af7 100644 (file)
@@ -31,13 +31,6 @@ type statsResults struct {
        maxError    float64
 }
 
-func max(a, b float64) float64 {
-       if a > b {
-               return a
-       }
-       return b
-}
-
 func nearEqual(a, b, closeEnough, maxError float64) bool {
        absDiff := math.Abs(a - b)
        if absDiff < closeEnough { // Necessary when one value is zero and one value is close to zero.