diff --git a/Sources/Units/Units.swift b/Sources/Units/Units.swift index 22d71ee..8fd8909 100644 --- a/Sources/Units/Units.swift +++ b/Sources/Units/Units.swift @@ -384,20 +384,20 @@ public struct UnitValue: } /// The result will have the `unit` of the left hand side value. - public static func * ( - lhs: UnitValue, rhs: Double + public static func * ( + lhs: UnitValue, rhs: R ) -> UnitValue { - .init(value: lhs.value * rhs, unit: lhs.unit) + .init(value: lhs.value * Double(rhs), unit: lhs.unit) } - public static func * ( - lhs: Double, rhs: UnitValue + public static func * ( + lhs: L, rhs: UnitValue ) -> UnitValue { - .init(value: lhs * rhs.value, unit: rhs.unit) + .init(value: Double(lhs) * rhs.value, unit: rhs.unit) } /// The result will have the `unit` of the left hand side value.