| author | |
| committer | |
| log | 4bd4c5e06d13c35a70d0207b730fb67b83ff6363 |
| tree | 0517048a378efcc81cf0f7358a00d46accb5f761 |
| parent | e6ebc41a07b294e602f8594e001df78e143e190f |
1 files changed, 1 insertions(+), 1 deletions(-)
std/math.zig+1-1| ... | ... | @@ -366,7 +366,7 @@ test "math.shl" { |
| 366 | 366 | } |
| 367 | 367 | |
| 368 | 368 | /// Shifts right. Overflowed bits are truncated. |
| 369 | /// A negative shift amount results in a lefft shift. | |
| 369 | /// A negative shift amount results in a left shift. | |
| 370 | 370 | pub fn shr(comptime T: type, a: T, shift_amt: var) T { |
| 371 | 371 | const abs_shift_amt = absCast(shift_amt); |
| 372 | 372 | const casted_shift_amt = if (abs_shift_amt >= T.bit_count) return 0 else @intCast(Log2Int(T), abs_shift_amt); |