all: use the built-in min/max function

Starting from Go 1.21, the min/max functions are built-in.

Therefore, we can remove the custom functions with the same name.

Change-Id: I8b7446923f4804bfb2693b1f9c75463844215921
Reviewed-on: https://go-review.googlesource.com/c/exp/+/707495
Auto-Submit: Sean Liao <sean@liao.dev>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Sean Liao <sean@liao.dev>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
diff --git a/rand/rand_test.go b/rand/rand_test.go
index 276a55f..65d3796 100644
--- a/rand/rand_test.go
+++ b/rand/rand_test.go
@@ -28,13 +28,6 @@
 	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.
diff --git a/shiny/text/text_test.go b/shiny/text/text_test.go
index 7c93212..a7e798e 100644
--- a/shiny/text/text_test.go
+++ b/shiny/text/text_test.go
@@ -20,13 +20,6 @@
 	"golang.org/x/image/math/fixed"
 )
 
-func min(a, b int) int {
-	if a < b {
-		return a
-	}
-	return b
-}
-
 func readAllText(dst []byte, f *Frame) []byte {
 	for p := f.FirstParagraph(); p != nil; p = p.Next(f) {
 		for l := p.FirstLine(f); l != nil; l = l.Next(f) {