Skip to content

Commit

Permalink
[NBKCoreKit] Update StaticBigInt code (#98) (#99).
Browse files Browse the repository at this point in the history
  • Loading branch information
oscbyspro committed Oct 7, 2023
1 parent a56d739 commit 659249e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/NBKCoreKit/Models/NBKStaticBigInt.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ extension NBKStaticBigInt {
//=------------------------------------------------------------------------=

@inlinable public var count: Int {
let width: Int = self.bitWidth
let major: Int = NBK .quotientDividingByBitWidthAssumingIsAtLeastZero(width)
let minor: Int = NBK.remainderDividingByBitWidthAssumingIsAtLeastZero(width)
return major &+ Int(bit: minor.isMoreThanZero)
let width = NBK.ZeroOrMore(unchecked: self.bitWidth)
let major = NBK .quotient(of: width, dividingBy: NBK.PowerOf2(unchecked: UInt.bitWidth))
let minor = NBK .remainder(of: width, dividingBy: NBK.PowerOf2(unchecked: UInt.bitWidth))
return major &+ Int(bit: minor.isMoreThanZero) as Int
}

@inlinable public var startIndex: Int {
Expand Down

0 comments on commit 659249e

Please sign in to comment.