oscbyspro / Ultimathnum

Binary arithmetic reimagined in Swift
Apache License 2.0
9 stars 1 forks source link

Add: Bit at index in DataInt.Body #129

Open oscbyspro opened 1 week ago

oscbyspro commented 1 week ago

Accessing a bit in a memory region is semi-common, but DataInt.Body doesn't have a Shift<T> bit index as integers do. Well, so I reasoned at some point. Count is semantically similar to Shift<T> so I suspect the following subscript would be convenient.

subscript(unchecked index: Count) -> Bit