mirror of
https://github.com/bloeys/nterm.git
synced 2025-12-29 06:28:20 +00:00
Starting using lines to render+rect glyph draw funcs
This commit is contained in:
10
ring/ring.go
10
ring/ring.go
@ -196,6 +196,16 @@ func (it *Iterator[T]) Next() (v T, done bool) {
|
||||
return v, false
|
||||
}
|
||||
|
||||
func (it *Iterator[T]) HasNext() bool {
|
||||
hasNext := it.InV1 || it.Curr < int64(len(it.V2))
|
||||
return hasNext
|
||||
}
|
||||
|
||||
func (it *Iterator[T]) HasPrev() bool {
|
||||
hasPrev := (!it.InV1 && it.Curr-1 >= 0) || (it.InV1 && it.Curr > 0)
|
||||
return hasPrev
|
||||
}
|
||||
|
||||
// Next returns the value at Iterator.Curr-1 and done=false
|
||||
//
|
||||
// If there are no more values to return the default value is returned for v and done=true
|
||||
|
||||
Reference in New Issue
Block a user