aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2024-05-15 11:04:10 +0200
committerGopher Robot <gobot@golang.org>2024-05-16 01:44:46 +0000
commit63a0a905fa8a84c46569aaee6b12d6530c7527e6 (patch)
treea5c3fbe1726a8a181ec0f410c6160cd144d8eec3 /src
parent1ffc296717ba27d5ca5dd9a81439a49367363c89 (diff)
downloadgo-63a0a905fa8a84c46569aaee6b12d6530c7527e6.tar.gz
go-63a0a905fa8a84c46569aaee6b12d6530c7527e6.zip
math/rand/v2: use max builtin in tests
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>
Diffstat (limited to 'src')
-rw-r--r--src/math/rand/v2/rand_test.go7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/math/rand/v2/rand_test.go b/src/math/rand/v2/rand_test.go
index d223180fb6..e89ee29f60 100644
--- a/src/math/rand/v2/rand_test.go
+++ b/src/math/rand/v2/rand_test.go
@@ -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.