mirror of
https://github.com/zoriya/bubbles.git
synced 2026-08-16 01:43:21 +00:00
chore(lint): remove custom min and max functions
These are now available as builtins.
This commit is contained in:
@@ -357,22 +357,8 @@ func (m Model) color(c string) termenv.Color {
|
||||
return m.colorProfile.Color(c)
|
||||
}
|
||||
|
||||
func max(a, b int) int {
|
||||
if a > b {
|
||||
return a
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// IsAnimating returns false if the progress bar reached equilibrium and is no longer animating.
|
||||
func (m *Model) IsAnimating() bool {
|
||||
dist := math.Abs(m.percentShown - m.targetPercent)
|
||||
return !(dist < 0.001 && m.velocity < 0.01)
|
||||
}
|
||||
|
||||
func min(a, b int) int {
|
||||
if a < b {
|
||||
return a
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user