We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc9f6e7 commit 35e15a3Copy full SHA for 35e15a3
Sources/IntegerUtilities/ShiftWithRounding.swift
@@ -173,12 +173,12 @@ extension BinaryInteger {
173
/// // is odd.
174
/// 3.shifted(rightBy: 1, rounding: .toOdd)
175
///
176
- /// // 7/4 = 1.75, so the result is 1 with probability 1/4, and 2
+ /// // 7/4 = 1.75, so the result is 1 with probability 1/4, or 2
177
/// // with probability 3/4.
178
/// 7.shifted(rightBy: 2, rounding: .stochastically)
179
180
/// // 4/4 is exactly 1, so this does not trap.
181
- /// 4.shifted(rightBy: 2, rounding: .trap)
+ /// 4.shifted(rightBy: 2, rounding: .requireExact)
182
183
/// // 5/2 is 2.5, which is not an integer, so this traps.
184
/// 5.shifted(rightBy: 1, rounding: .requireExact)
0 commit comments