Add faster divison.
This commit is contained in:
1 parent
2323ca1622
commit
47397a6a48
3 files changed
+177
-8
No files matched your search
@@ -340,7 +340,7 @@ zero :: clear;
|
||||
Set the `Int` to 1 and optionally shrink it to the minimum backing size.
|
||||
*/
|
||||
int_one :: proc(a: ^Int, minimize := false, allocator := context.allocator) -> (err: Error) {
|
||||
return copy(a, ONE, minimize, allocator);
|
||||
return set(a, 1);
|
||||
}
|
||||
one :: proc { int_one, };
|
||||
|
||||
@@ -348,7 +348,7 @@ one :: proc { int_one, };
|
||||
Set the `Int` to -1 and optionally shrink it to the minimum backing size.
|
||||
*/
|
||||
int_minus_one :: proc(a: ^Int, minimize := false, allocator := context.allocator) -> (err: Error) {
|
||||
return copy(a, MINUS_ONE, minimize, allocator);
|
||||
return set(a, -1);
|
||||
}
|
||||
minus_one :: proc { int_minus_one, };
|
||||
|
||||
|
||||
Reference in new issue
Block a user