|
3 | 3 | // NumberKit |
4 | 4 | // |
5 | 5 | // Created by Matthias Zenger on 12/08/2015. |
6 | | -// Copyright © 2015-2019 Matthias Zenger. All rights reserved. |
| 6 | +// Copyright © 2015-2020 Matthias Zenger. All rights reserved. |
7 | 7 | // |
8 | 8 | // Licensed under the Apache License, Version 2.0 (the "License"); |
9 | 9 | // you may not use this file except in compliance with the License. |
@@ -39,8 +39,8 @@ public struct BigInt: Hashable, |
39 | 39 |
|
40 | 40 | // Redefine the coding key names. |
41 | 41 | enum CodingKeys: String, CodingKey { |
42 | | - case uwords = "words" |
43 | | - case negative |
| 42 | + case uwords = "words" |
| 43 | + case negative |
44 | 44 | } |
45 | 45 |
|
46 | 46 | // This is an array of `UInt32` words. The lowest significant word comes first in |
@@ -1136,19 +1136,22 @@ extension BigInt: IntegerNumber, |
1136 | 1136 | return (self.plus(rhs), overflow: false) |
1137 | 1137 | } |
1138 | 1138 |
|
1139 | | - public func subtractingReportingOverflow(_ rhs: BigInt) -> (partialValue: BigInt, overflow: Bool) { |
| 1139 | + public func subtractingReportingOverflow(_ rhs: BigInt) -> (partialValue: BigInt, |
| 1140 | + overflow: Bool) { |
1140 | 1141 | return (self.minus(rhs), overflow: false) |
1141 | 1142 | } |
1142 | 1143 |
|
1143 | | - public func multipliedReportingOverflow(by rhs: BigInt) -> (partialValue: BigInt, overflow: Bool) { |
| 1144 | + public func multipliedReportingOverflow(by rhs: BigInt) -> (partialValue: BigInt, |
| 1145 | + overflow: Bool) { |
1144 | 1146 | return (self.times(rhs), overflow: false) |
1145 | 1147 | } |
1146 | 1148 |
|
1147 | 1149 | public func dividedReportingOverflow(by rhs: BigInt) -> (partialValue: BigInt, overflow: Bool) { |
1148 | 1150 | return (self.divided(by: rhs).quotient, overflow: false) |
1149 | 1151 | } |
1150 | 1152 |
|
1151 | | - public func remainderReportingOverflow(dividingBy rhs: BigInt) -> (partialValue: BigInt, overflow: Bool) { |
| 1153 | + public func remainderReportingOverflow(dividingBy rhs: BigInt) -> (partialValue: BigInt, |
| 1154 | + overflow: Bool) { |
1152 | 1155 | return (self.divided(by: rhs).remainder, overflow: false) |
1153 | 1156 | } |
1154 | 1157 |
|
|
0 commit comments