diff options
| author | gingerBill <bill@gingerbill.org> | 2023-09-28 16:40:01 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-09-28 16:40:01 +0100 |
| commit | 2ac463f00388fada871f45b466d393d3fe8dd59f (patch) | |
| tree | 58d65d8ef067aeb21dbfa98c8e90662612cfb3e3 /core/math | |
| parent | 77227c2ff552a81741130ae17d58847c3cfe3ba3 (diff) | |
Rename bitwise operations to `bit_or` etc
Diffstat (limited to 'core/math')
| -rw-r--r-- | core/math/big/logical.odin | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/core/math/big/logical.odin b/core/math/big/logical.odin index b5de4cabf..00134228b 100644 --- a/core/math/big/logical.odin +++ b/core/math/big/logical.odin @@ -22,43 +22,43 @@ package math_big /* 2's complement `and`, returns `dest = a & b;` */ -int_and :: proc(dest, a, b: ^Int, allocator := context.allocator) -> (err: Error) { +int_bit_and :: proc(dest, a, b: ^Int, allocator := context.allocator) -> (err: Error) { assert_if_nil(dest, a, b) context.allocator = allocator internal_clear_if_uninitialized(a, b) or_return return #force_inline internal_int_and(dest, a, b) } -and :: proc { int_and, } +bit_and :: proc { int_bit_and, } /* 2's complement `or`, returns `dest = a | b;` */ -int_or :: proc(dest, a, b: ^Int, allocator := context.allocator) -> (err: Error) { +int_bit_or :: proc(dest, a, b: ^Int, allocator := context.allocator) -> (err: Error) { assert_if_nil(dest, a, b) context.allocator = allocator internal_clear_if_uninitialized(a, b) or_return return #force_inline internal_int_or(dest, a, b) } -or :: proc { int_or, } +bit_or :: proc { int_bit_or, } /* 2's complement `xor`, returns `dest = a ^ b;` */ -int_xor :: proc(dest, a, b: ^Int, allocator := context.allocator) -> (err: Error) { +int_bit_xor :: proc(dest, a, b: ^Int, allocator := context.allocator) -> (err: Error) { assert_if_nil(dest, a, b) context.allocator = allocator internal_clear_if_uninitialized(a, b) or_return return #force_inline internal_int_xor(dest, a, b) } -xor :: proc { int_xor, } +bit_xor :: proc { int_bit_xor, } /* dest = ~src */ -int_complement :: proc(dest, src: ^Int, allocator := context.allocator) -> (err: Error) { +int_bit_complement :: proc(dest, src: ^Int, allocator := context.allocator) -> (err: Error) { /* Check that `src` and `dest` are usable. */ @@ -68,7 +68,7 @@ int_complement :: proc(dest, src: ^Int, allocator := context.allocator) -> (err: internal_clear_if_uninitialized(dest, src) or_return return #force_inline internal_int_complement(dest, src) } -complement :: proc { int_complement, } +bit_complement :: proc { int_bit_complement, } /* quotient, remainder := numerator >> bits; |