@@ -75,7 +75,7 @@ extension Measurement where UnitType : Dimension {
75
75
/// Add two measurements of the same Unit.
76
76
/// - precondition: The `unit` of `lhs` and `rhs` must be `isEqual`.
77
77
/// - returns: A measurement of value `lhs.value + rhs.value` and unit `lhs.unit`.
78
- public func + < UnitType : Unit > ( lhs: Measurement < UnitType > , rhs: Measurement < UnitType > ) -> Measurement < UnitType > {
78
+ public func + < UnitType> ( lhs: Measurement < UnitType > , rhs: Measurement < UnitType > ) -> Measurement < UnitType > {
79
79
if lhs. unit. isEqual ( rhs. unit) {
80
80
return Measurement ( value: lhs. value + rhs. value, unit: lhs. unit)
81
81
} else {
@@ -100,7 +100,7 @@ public func +<UnitType : Dimension>(lhs: Measurement<UnitType>, rhs: Measurement
100
100
/// Subtract two measurements of the same Unit.
101
101
/// - precondition: The `unit` of `lhs` and `rhs` must be `isEqual`.
102
102
/// - returns: A measurement of value `lhs.value - rhs.value` and unit `lhs.unit`.
103
- public func - < UnitType : Unit > ( lhs: Measurement < UnitType > , rhs: Measurement < UnitType > ) -> Measurement < UnitType > {
103
+ public func - < UnitType> ( lhs: Measurement < UnitType > , rhs: Measurement < UnitType > ) -> Measurement < UnitType > {
104
104
if lhs. unit. isEqual ( rhs. unit) {
105
105
return Measurement ( value: lhs. value - rhs. value, unit: lhs. unit)
106
106
} else {
@@ -124,31 +124,31 @@ public func -<UnitType : Dimension>(lhs: Measurement<UnitType>, rhs: Measurement
124
124
125
125
/// Multiply a measurement by a scalar value.
126
126
/// - returns: A measurement of value `lhs.value * rhs` with the same unit as `lhs`.
127
- public func * < UnitType : Unit > ( lhs: Measurement < UnitType > , rhs: Double ) -> Measurement < UnitType > {
127
+ public func * < UnitType> ( lhs: Measurement < UnitType > , rhs: Double ) -> Measurement < UnitType > {
128
128
return Measurement ( value: lhs. value * rhs, unit: lhs. unit)
129
129
}
130
130
131
131
/// Multiply a scalar value by a measurement.
132
132
/// - returns: A measurement of value `lhs * rhs.value` with the same unit as `rhs`.
133
- public func * < UnitType : Unit > ( lhs: Double , rhs: Measurement < UnitType > ) -> Measurement < UnitType > {
133
+ public func * < UnitType> ( lhs: Double , rhs: Measurement < UnitType > ) -> Measurement < UnitType > {
134
134
return Measurement ( value: lhs * rhs. value, unit: rhs. unit)
135
135
}
136
136
137
137
/// Divide a measurement by a scalar value.
138
138
/// - returns: A measurement of value `lhs.value / rhs` with the same unit as `lhs`.
139
- public func / < UnitType : Unit > ( lhs: Measurement < UnitType > , rhs: Double ) -> Measurement < UnitType > {
139
+ public func / < UnitType> ( lhs: Measurement < UnitType > , rhs: Double ) -> Measurement < UnitType > {
140
140
return Measurement ( value: lhs. value / rhs, unit: lhs. unit)
141
141
}
142
142
143
143
/// Divide a scalar value by a measurement.
144
144
/// - returns: A measurement of value `lhs / rhs.value` with the same unit as `rhs`.
145
- public func / < UnitType : Unit > ( lhs: Double , rhs: Measurement < UnitType > ) -> Measurement < UnitType > {
145
+ public func / < UnitType> ( lhs: Double , rhs: Measurement < UnitType > ) -> Measurement < UnitType > {
146
146
return Measurement ( value: lhs / rhs. value, unit: rhs. unit)
147
147
}
148
148
149
149
/// Compare two measurements of the same `Unit`.
150
150
/// - returns: `true` if `lhs.value == rhs.value && lhs.unit == rhs.unit`.
151
- public func == < UnitType : Unit > ( lhs: Measurement < UnitType > , rhs: Measurement < UnitType > ) -> Bool {
151
+ public func == < UnitType> ( lhs: Measurement < UnitType > , rhs: Measurement < UnitType > ) -> Bool {
152
152
return lhs. value == rhs. value && lhs. unit == rhs. unit
153
153
}
154
154
@@ -168,7 +168,7 @@ public func ==<UnitType : Dimension>(lhs: Measurement<UnitType>, rhs: Measuremen
168
168
/// Compare two measurements of the same `Unit`.
169
169
/// - note: This function does not check `==` for the `unit` property of `lhs` and `rhs`.
170
170
/// - returns: `lhs.value < rhs.value`
171
- public func <<UnitType : Unit > ( lhs: Measurement < UnitType > , rhs: Measurement < UnitType > ) -> Bool {
171
+ public func <<UnitType> ( lhs: Measurement < UnitType > , rhs: Measurement < UnitType > ) -> Bool {
172
172
return lhs. value < rhs. value
173
173
}
174
174
@@ -188,7 +188,7 @@ public func <<UnitType : Dimension>(lhs: Measurement<UnitType>, rhs: Measurement
188
188
/// Compare two measurements of the same `Unit`.
189
189
/// - note: This function does not check `==` for the `unit` property of `lhs` and `rhs`.
190
190
/// - returns: `lhs.value > rhs.value`
191
- public func > < UnitType : Unit > ( lhs: Measurement < UnitType > , rhs: Measurement < UnitType > ) -> Bool {
191
+ public func > < UnitType> ( lhs: Measurement < UnitType > , rhs: Measurement < UnitType > ) -> Bool {
192
192
return lhs. value > rhs. value
193
193
}
194
194
@@ -208,7 +208,7 @@ public func ><UnitType : Dimension>(lhs: Measurement<UnitType>, rhs: Measurement
208
208
/// Compare two measurements of the same `Unit`.
209
209
/// - note: This function does not check `==` for the `unit` property of `lhs` and `rhs`.
210
210
/// - returns: `lhs.value <= rhs.value`
211
- public func <= < UnitType : Unit > ( lhs: Measurement < UnitType > , rhs: Measurement < UnitType > ) -> Bool {
211
+ public func <= < UnitType> ( lhs: Measurement < UnitType > , rhs: Measurement < UnitType > ) -> Bool {
212
212
return lhs. value <= rhs. value
213
213
}
214
214
@@ -228,7 +228,7 @@ public func <=<UnitType : Dimension>(lhs: Measurement<UnitType>, rhs: Measuremen
228
228
/// Compare two measurements of the same `Unit`.
229
229
/// - note: This function does not check `==` for the `unit` property of `lhs` and `rhs`.
230
230
/// - returns: `lhs.value >= rhs.value`
231
- public func >= < UnitType : Unit > ( lhs: Measurement < UnitType > , rhs: Measurement < UnitType > ) -> Bool {
231
+ public func >= < UnitType> ( lhs: Measurement < UnitType > , rhs: Measurement < UnitType > ) -> Bool {
232
232
return lhs. value >= rhs. value
233
233
}
234
234
0 commit comments