diff --git a/base/builtin/index.html b/base/builtin/index.html index c2a4ed247b..f4e1c33a35 100644 --- a/base/builtin/index.html +++ b/base/builtin/index.html @@ -237,17 +237,30 @@
jmag
returns the j-imaginary part of a quaternion number v
. The return value will be the floating-point type corresponding to the type of v
.
kmag
returns the k-imaginary part of a quaternion number v
. The return value will be the floating-point type corresponding to the type of v
.
raw_soa_footer_slice :: proc(array: ^$T/#soa[]$T) -> (footer: ^Raw_SOA_Footer_Slice) {…}+
raw_soa_footer_dynamic_array :: proc(array: ^$T/#soa[dynamic]$T) -> (footer: ^Raw_SOA_Footer_Dynamic_Array) {…}+
unordered_remove :: proc(array: ^$T/[dynamic]$T, index: int, loc := #caller_location) {…}@@ -1495,6 +1507,12 @@
make_soa_aligned :: proc($T: typeid/#soa[]T, length: int, alignment: int, allocator := context.allocator, loc := #caller_location) -> (array: T, err: Allocator_Error) #optional_ok {…}+
ordered_remove :: proc(array: ^$T/[dynamic]$T, index: int, loc := #caller_location) {…}@@ -1508,6 +1526,24 @@
make_soa_slice :: proc($T: typeid/#soa[]T, length: int, allocator := context.allocator, loc := #caller_location) -> (array: T, err: Allocator_Error) #optional_ok {…}+
make_soa_dynamic_array :: proc($T: typeid/#soa[dynamic]T, allocator := context.allocator, loc := #caller_location) -> (array: T, err: Allocator_Error) #optional_ok {…}+
make_soa_dynamic_array_len :: proc($T: typeid/#soa[dynamic]T, #any_int length: int, allocator := context.allocator, loc := #caller_location) -> (array: T, err: Allocator_Error) #optional_ok {…}+
remove_range :: proc(array: ^$T/[dynamic]$T, lo, hi: int, loc := #caller_location) {…}@@ -1520,6 +1556,12 @@
make_soa_dynamic_array_len_cap :: proc($T: typeid/#soa[dynamic]T, #any_int length, #any_int capacity: int, allocator := context.allocator, loc := #caller_location) -> (array: T, err: Allocator_Error) #optional_ok {…}+
pop :: proc(array: ^$T/[dynamic]$T, loc := #caller_location) -> (res: $T) {…}@@ -1531,6 +1573,12 @@
resize_soa :: proc(array: ^$T/#soa[dynamic]$T, length: int, loc := #caller_location) -> Allocator_Error {…}+
pop_safe :: proc "contextless" (array: ^$T/[dynamic]$T) -> (res: $T, ok: bool) {…}@@ -1542,6 +1590,24 @@
reserve_soa :: proc(array: ^$T/#soa[dynamic]$T, capacity: int, loc := #caller_location) -> Allocator_Error {…}+
append_soa_elem :: proc(array: ^$T/#soa[dynamic]$T, arg: $T, loc := #caller_location) -> (n: int, err: Allocator_Error) #optional_ok {…}+
append_soa_elems :: proc(array: ^$T/#soa[dynamic]$T, .. args: ..$T, loc := #caller_location) -> (n: int, err: Allocator_Error) #optional_ok {…}+
pop_front :: proc(array: ^$T/[dynamic]$T, loc := #caller_location) -> (res: $T) {…}@@ -1586,6 +1652,20 @@
unordered_remove_soa :: proc(array: ^$T/#soa[dynamic]$T, index: int, loc := #caller_location) {…}+
unordered_remove_soa
removed the element at the specified index
. It does so by replacing the current end value
+with the old value, and reducing the length of the dynamic array by 1.
Note: This is an O(1) operation.
+Note: If you the elements to remain in their order, use ordered_remove_soa
.
+Note: If the index is out of bounds, this procedure will panic.
delete_dynamic_array :: proc(array: $T/[dynamic]$T, loc := #caller_location) -> Allocator_Error {…}@@ -1608,6 +1688,19 @@
ordered_remove_soa :: proc(array: ^$T/#soa[dynamic]$T, index: int, loc := #caller_location) {…}+
ordered_remove_soa
removed the element at the specified index
whilst keeping the order of the other elements.
Note: This is an O(N) operation.
+Note: If you the elements do not have to remain in their order, prefer unordered_remove_soa
.
+Note: If the index is out of bounds, this procedure will panic.
delete_map :: proc(m: $T/map[$T]$T, loc := #caller_location) -> Allocator_Error {…}@@ -1841,12 +1934,6 @@
raw_soa_footer_slice :: proc(array: ^$T/#soa[]$T) -> (footer: ^Raw_SOA_Footer_Slice) {…}-
clear_dynamic_array :: proc "contextless" (array: ^$T/[dynamic]$T) {…}@@ -1858,54 +1945,18 @@
raw_soa_footer_dynamic_array :: proc(array: ^$T/#soa[dynamic]$T) -> (footer: ^Raw_SOA_Footer_Dynamic_Array) {…}-
make_soa_aligned :: proc($T: typeid/#soa[]T, length: int, alignment: int, allocator := context.allocator, loc := #caller_location) -> (array: T, err: Allocator_Error) #optional_ok {…}-
make_soa_slice :: proc($T: typeid/#soa[]T, length: int, allocator := context.allocator, loc := #caller_location) -> (array: T, err: Allocator_Error) #optional_ok {…}-
reserve_dynamic_array :: proc(array: ^$T/[dynamic]$T, capacity: int, loc := #caller_location) -> Allocator_Error {…}
make_soa_dynamic_array :: proc($T: typeid/#soa[dynamic]T, allocator := context.allocator, loc := #caller_location) -> (array: T, err: Allocator_Error) #optional_ok {…}-
non_zero_reserve_dynamic_array :: proc(array: ^$T/[dynamic]$T, capacity: int, loc := #caller_location) -> Allocator_Error {…}
make_soa_dynamic_array_len :: proc($T: typeid/#soa[dynamic]T, #any_int length: int, allocator := context.allocator, loc := #caller_location) -> (array: T, err: Allocator_Error) #optional_ok {…}-
make_soa_dynamic_array_len_cap :: proc($T: typeid/#soa[dynamic]T, #any_int length, #any_int capacity: int, allocator := context.allocator, loc := #caller_location) -> (array: T, err: Allocator_Error) #optional_ok {…}-
resize_dynamic_array :: proc(array: ^$T/[dynamic]$T, length: int, loc := #caller_location) -> Allocator_Error {…}@@ -1918,30 +1969,12 @@
resize_soa :: proc(array: ^$T/#soa[dynamic]$T, length: int, loc := #caller_location) -> Allocator_Error {…}-
reserve_soa :: proc(array: ^$T/#soa[dynamic]$T, capacity: int, loc := #caller_location) -> Allocator_Error {…}-
map_insert :: proc(m: ^$T/map[$T]$T, key: $T, value: $T, loc := #caller_location) -> (ptr: ^$T) {…}
append_soa_elem :: proc(array: ^$T/#soa[dynamic]$T, arg: $T, loc := #caller_location) -> (n: int, err: Allocator_Error) #optional_ok {…}-
map_upsert :: proc(m: ^$T/map[$T]$T, key: $T, value: $T, loc := #caller_location) -> (prev_key: $T, value_ptr: ^$T, found_previous: bool) {…}@@ -1955,12 +1988,6 @@
append_soa_elems :: proc(array: ^$T/#soa[dynamic]$T, .. args: ..$T, loc := #caller_location) -> (n: int, err: Allocator_Error) #optional_ok {…}-
card :: proc "contextless" (s: $S/bit_set[$T]) -> int {…}@@ -1973,39 +2000,12 @@
unordered_remove_soa :: proc(array: ^$T/#soa[dynamic]$T, index: int, loc := #caller_location) {…}-
unordered_remove_soa
removed the element at the specified index
. It does so by replacing the current end value
-with the old value, and reducing the length of the dynamic array by 1.
Note: This is an O(1) operation.
-Note: If you the elements to remain in their order, use ordered_remove_soa
.
-Note: If the index is out of bounds, this procedure will panic.
panic :: proc(message: string, loc := #caller_location) -> ! {…}
ordered_remove_soa :: proc(array: ^$T/#soa[dynamic]$T, index: int, loc := #caller_location) {…}-
ordered_remove_soa
removed the element at the specified index
whilst keeping the order of the other elements.
Note: This is an O(N) operation.
-Note: If you the elements do not have to remain in their order, prefer unordered_remove_soa
.
-Note: If the index is out of bounds, this procedure will panic.
unimplemented :: proc(message: string, loc := #caller_location) -> ! {…}@@ -2029,6 +2029,32 @@
make_soa :: proc{ + make_soa_slice, + make_soa_dynamic_array, + make_soa_dynamic_array_len, + make_soa_dynamic_array_len_cap, +} ++
append_soa :: proc{ + append_soa_elem, + append_soa_elems, +} ++
The append_soa built-in procedure appends elements to the end of an #soa dynamic array
+clear :: proc{ @@ -2057,6 +2083,16 @@reserve
delete_soa :: proc{ + delete_soa_slice, + delete_soa_dynamic_array, +} ++
non_zero_reserve :: proc{ @@ -2115,6 +2151,15 @@free +
clear_soa ¶
+++clear_soa :: proc{ + clear_soa_dynamic_array, +} ++
free_all :: proc{ @@ -2216,51 +2261,6 @@assign_at
make_soa :: proc{ - make_soa_slice, - make_soa_dynamic_array, - make_soa_dynamic_array_len, - make_soa_dynamic_array_len_cap, -} --
append_soa :: proc{ - append_soa_elem, - append_soa_elems, -} --
The append_soa built-in procedure appends elements to the end of an #soa dynamic array
-delete_soa :: proc{ - delete_soa_slice, - delete_soa_dynamic_array, -} --
clear_soa :: proc{ - clear_soa_dynamic_array, -} --