We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 53efb5d commit 4517146Copy full SHA for 4517146
1 file changed
Sources/BitWriter.swift
@@ -75,6 +75,9 @@ extension BitWriter {
75
76
The default value of `representation` is `SignedNumberRepresentation.twoComplementNegatives`.
77
78
+ For the representations where zero can be represented in two ways (namely, `.signMagnitude` and
79
+ `.oneComplementNegatives`), zero is encoded as +0 (i.e. all bits are set to zero).
80
+
81
- Precondition: The `signedNumber` must be representable within `bitsCount` bits using the `representation`, i.e.
82
it must be in the `representation.minRepresentableNumber...representation.maxRepresentableNumber` range.
83
- Precondition: For the `SignedNumberRepresentation.biased` representation, the `bias` must be non-negative.
0 commit comments