mirror of
https://github.com/ziglang/zig.git
synced 2024-11-16 17:15:37 +00:00
Fixed tiny typo in the math module (shr's description)
This commit is contained in:
parent
e6ebc41a07
commit
4bd4c5e06d
@ -366,7 +366,7 @@ test "math.shl" {
|
||||
}
|
||||
|
||||
/// Shifts right. Overflowed bits are truncated.
|
||||
/// A negative shift amount results in a lefft shift.
|
||||
/// A negative shift amount results in a left shift.
|
||||
pub fn shr(comptime T: type, a: T, shift_amt: var) T {
|
||||
const abs_shift_amt = absCast(shift_amt);
|
||||
const casted_shift_amt = if (abs_shift_amt >= T.bit_count) return 0 else @intCast(Log2Int(T), abs_shift_amt);
|
||||
|
Loading…
Reference in New Issue
Block a user