separate number into float and integer
This commit is contained in:
parent
10f55313b0
commit
daab50d54c
22 changed files with 848 additions and 428 deletions
|
|
@ -7,10 +7,10 @@ type Stack[T any] struct {
|
|||
items []T
|
||||
}
|
||||
|
||||
func NewStack[T any](capacity Pos) *Stack[T] {
|
||||
func NewStack[T any](maxCapacity Pos) *Stack[T] {
|
||||
return &Stack[T]{
|
||||
items: make([]T, 16),
|
||||
Capacity: capacity,
|
||||
items: make([]T, min(maxCapacity, 16)),
|
||||
Capacity: maxCapacity,
|
||||
Current: 0,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue