From c28024b17db4843ab9f371f6f9f7e7f4e0de1ad9 Mon Sep 17 00:00:00 2001 From: cdricms <36056008+cdricms@users.noreply.github.com> Date: Sat, 13 Sep 2025 23:20:06 +0200 Subject: [PATCH] Does it work now ? --- Sources/Units/Units.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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.