From c133daaba30d6c75eda2136a3c11682710f4562a Mon Sep 17 00:00:00 2001 From: Keuin Date: Fri, 7 Jul 2023 00:33:12 +0800 Subject: Refactor: remove unused code. --- common/minmax.go | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 common/minmax.go (limited to 'common/minmax.go') diff --git a/common/minmax.go b/common/minmax.go deleted file mode 100644 index b670887..0000000 --- a/common/minmax.go +++ /dev/null @@ -1,27 +0,0 @@ -package common - -/* -Golang is a piece of shit. Its creators are paranoids. -*/ - -import ( - "golang.org/x/exp/constraints" -) - -type Number interface { - constraints.Integer | constraints.Float -} - -func Min[T Number](t1 T, t2 T) T { - if t1 < t2 { - return t1 - } - return t2 -} - -func Max[T Number](t1 T, t2 T) T { - if t1 > t2 { - return t1 - } - return t2 -} -- cgit v1.2.3