mirror of
https://github.com/zoriya/bubbles.git
synced 2026-08-05 04:36:07 +00:00
chore(lint): remove custom min and max functions
These are now available as builtins.
This commit is contained in:
@@ -438,22 +438,6 @@ func (m *Model) renderRow(r int) string {
|
||||
return row
|
||||
}
|
||||
|
||||
func max(a, b int) int {
|
||||
if a > b {
|
||||
return a
|
||||
}
|
||||
|
||||
return b
|
||||
}
|
||||
|
||||
func min(a, b int) int {
|
||||
if a < b {
|
||||
return a
|
||||
}
|
||||
|
||||
return b
|
||||
}
|
||||
|
||||
func clamp(v, low, high int) int {
|
||||
return min(max(v, low), high)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user