Documentation
¶
Overview ¶
vector/bruh.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Vec ¶ added in v1.0.2
type Vec[T any] struct { Capacity int Updator float32 Data *[]T // contains filtered or unexported fields }
func (*Vec[T]) Extend ¶ added in v1.0.2
#
Extend extends the capacity of the vector.
`by` : is optional and specifies the amount by which the capacity should be increased. If 'by' is 0, the capacity will be increased by its current value multiplied by the Updator. No return value.
func (*Vec[T]) Push ¶ added in v1.0.2
func (me *Vec[T]) Push(v T)
Push adds a new element to the vector.
The element to be added is passed as the parameter v. No return value. EX:
bruh.Push(69)
bruh.Push(MyStruct{name: "mohammed" , age: 20})
func (*Vec[T]) RemoveByIndex ¶ added in v1.0.2
Click to show internal directories.
Click to hide internal directories.