File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 22const std = @import ("../std.zig" );
33
44/// Result type of `egcd`.
5- pub fn ExtendedCommonDivisor (S : anytype ) type {
5+ pub fn ExtendedGreatestCommonDivisor (S : anytype ) type {
66 if (@typeInfo (S ) != .int or @typeInfo (S ).int .signedness != .signed ) {
77 @compileError ("`S` must be a signed integer." );
88 }
@@ -15,7 +15,7 @@ pub fn ExtendedCommonDivisor(S: anytype) type {
1515}
1616
1717/// Returns the Extended Greatest Common Divisor (EGCD) of two signed integers (`a` and `b`) which are not both zero.
18- pub fn egcd (a : anytype , b : anytype ) ExtendedCommonDivisor (@TypeOf (a , b )) {
18+ pub fn egcd (a : anytype , b : anytype ) ExtendedGreatestCommonDivisor (@TypeOf (a , b )) {
1919 const S = switch (@TypeOf (a , b )) {
2020 // convert comptime_int to some sized int type for @ctz
2121 comptime_int = > b : {
You can’t perform that action at this time.
0 commit comments