You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fatalError("Attempt to add measurements with non-equal units")
84
+
}
83
85
}
84
86
}
85
87
86
-
/// Add two measurements of the same Dimension.
87
-
///
88
-
/// If the `unit` of the `lhs` and `rhs` are `isEqual`, then this returns the result of adding the `value` of each `Measurement`. If they are not equal, then this will convert both to the base unit of the `Dimension` and return the result as a `Measurement` of that base unit.
89
-
/// - returns: The result of adding the two measurements.
/// If the `unit` of the `lhs` and `rhs` are `isEqual`, then this returns the result of adding the `value` of each `Measurement`. If they are not equal, then this will convert both to the base unit of the `Dimension` and return the result as a `Measurement` of that base unit.
92
+
/// - returns: The result of adding the two measurements.
fatalError("Attempt to subtract measurements with non-equal units")
113
+
}
108
114
}
109
115
}
110
116
111
-
/// Subtract two measurements of the same Dimension.
112
-
///
113
-
/// If the `unit` of the `lhs` and `rhs` are `==`, then this returns the result of subtracting the `value` of each `Measurement`. If they are not equal, then this will convert both to the base unit of the `Dimension` and return the result as a `Measurement` of that base unit.
114
-
/// - returns: The result of adding the two measurements.
/// Subtract two measurements of the same Dimension.
119
+
///
120
+
/// If the `unit` of the `lhs` and `rhs` are `==`, then this returns the result of subtracting the `value` of each `Measurement`. If they are not equal, then this will convert both to the base unit of the `Dimension` and return the result as a `Measurement` of that base unit.
121
+
/// - returns: The result of adding the two measurements.
/// Compare two measurements of the same `Dimension`.
156
-
///
157
-
/// If `lhs.unit == rhs.unit`, returns `lhs.value == rhs.value`. Otherwise, converts `rhs` to the same unit as `lhs` and then compares the resulting values.
158
-
/// - returns: `true` if the measurements are equal.
/// Compare two measurements of the same `Dimension`.
167
+
///
168
+
/// If `lhs.unit == rhs.unit`, returns `lhs.value == rhs.value`. Otherwise, converts `rhs` to the same unit as `lhs` and then compares the resulting values.
169
+
/// - returns: `true` if the measurements are equal.
/// Compare two measurements of the same `Dimension`.
176
-
///
177
-
/// If `lhs.unit == rhs.unit`, returns `lhs.value < rhs.value`. Otherwise, converts `rhs` to the same unit as `lhs` and then compares the resulting values.
178
-
/// - returns: `true` if `lhs` is less than `rhs`.
/// Compare two measurements of the same `Dimension`.
191
+
///
192
+
/// If `lhs.unit == rhs.unit`, returns `lhs.value < rhs.value`. Otherwise, converts `rhs` to the same unit as `lhs` and then compares the resulting values.
193
+
/// - returns: `true` if `lhs` is less than `rhs`.
/// Compare two measurements of the same `Dimension`.
196
-
///
197
-
/// If `lhs.unit == rhs.unit`, returns `lhs.value > rhs.value`. Otherwise, converts `rhs` to the same unit as `lhs` and then compares the resulting values.
198
-
/// - returns: `true` if `lhs` is greater than `rhs`.
/// Compare two measurements of the same `Dimension`.
215
+
///
216
+
/// If `lhs.unit == rhs.unit`, returns `lhs.value > rhs.value`. Otherwise, converts `rhs` to the same unit as `lhs` and then compares the resulting values.
217
+
/// - returns: `true` if `lhs` is greater than `rhs`.
/// Compare two measurements of the same `Dimension`.
216
-
///
217
-
/// If `lhs.unit == rhs.unit`, returns `lhs.value < rhs.value`. Otherwise, converts `rhs` to the same unit as `lhs` and then compares the resulting values.
218
-
/// - returns: `true` if `lhs` is less than or equal to `rhs`.
/// Compare two measurements of the same `Dimension`.
239
+
///
240
+
/// If `lhs.unit == rhs.unit`, returns `lhs.value < rhs.value`. Otherwise, converts `rhs` to the same unit as `lhs` and then compares the resulting values.
241
+
/// - returns: `true` if `lhs` is less than or equal to `rhs`.
/// Compare two measurements of the same `Dimension`.
236
-
///
237
-
/// If `lhs.unit == rhs.unit`, returns `lhs.value >= rhs.value`. Otherwise, converts `rhs` to the same unit as `lhs` and then compares the resulting values.
238
-
/// - returns: `true` if `lhs` is greater or equal to `rhs`.
/// Compare two measurements of the same `Dimension`.
263
+
///
264
+
/// If `lhs.unit == rhs.unit`, returns `lhs.value >= rhs.value`. Otherwise, converts `rhs` to the same unit as `lhs` and then compares the resulting values.
265
+
/// - returns: `true` if `lhs` is greater or equal to `rhs`.
0 commit comments