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 fe15113 commit f7075ccCopy full SHA for f7075cc
Sources/IntegerUtilities/README.md
@@ -63,6 +63,11 @@ let c = x.addingWithSaturation(y) // saturates to 127
63
There is one other method, `shiftedWithSaturation(leftBy:rounding:)`,
64
which performs a bitwise shift with rounding and saturation.
65
66
+If you are using saturating arithmetic, you may also want to perform
67
+saturating conversions between integer types; this functionality is provided
68
+by the standard library via the [`init(clamping:)` API]
69
+(https://developer.apple.com/documentation/swift/binaryinteger/init(clamping:))
70
+
71
## Types
72
73
The `RoundingRule` enum is used with shift, division, and round operations to specify how to round their results to a representable value.
0 commit comments