mirror of
https://github.com/zoriya/bubbles.git
synced 2026-08-05 04:36:07 +00:00
feat(v2)!: update to go 1.22 (#724)
* feat(v2)!: update to go 1.22 * fix: ci * fix: more
This commit is contained in:
@@ -345,22 +345,8 @@ func (m *Model) setRamp(colorA, colorB string, scaled bool) {
|
||||
m.rampColorB = b
|
||||
}
|
||||
|
||||
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