diff --git a/lib/std/math.zig b/lib/std/math.zig index aec6f03ce0d4d8d7b4407c6be5bf241db47b0371..ec4f47edc1f0ff887ed728ffb636d363e66dfaad 100644 --- a/lib/std/math.zig +++ b/lib/std/math.zig @@ -1879,7 +1879,7 @@ test sign { /// Increases the bit width of an integer by copying the most significant bit. /// This results in the input and output having the same arithmetic value, when /// interpreted as two's complement integers. -fn signExtend(To: type, n: anytype) To { +pub fn signExtend(To: type, n: anytype) To { const From = @TypeOf(n); if (From == u0) return 0; const FromSigned = @Int(.signed, @typeInfo(From).int.bits);