Does it work now ,

This commit is contained in:
cdricms
2025-09-13 23:16:48 +02:00
parent 34e27dc661
commit f10858a604

View File

@@ -384,20 +384,20 @@ public struct UnitValue<ValueType: ConvertibleToDouble>:
} }
/// The result will have the `unit` of the left hand side value. /// The result will have the `unit` of the left hand side value.
public static func * <L: ConvertibleToDouble, R: ConvertibleToDouble>( public static func * <L: ConvertibleToDouble>(
lhs: UnitValue<L>, rhs: R lhs: UnitValue<L>, rhs: Double
) )
-> UnitValue<Double> -> UnitValue<Double>
{ {
.init(value: lhs.value * rhs.doubleValue, unit: lhs.unit) .init(value: lhs.value * rhs, unit: lhs.unit)
} }
public static func * <L: ConvertibleToDouble, R: ConvertibleToDouble>( public static func * <R: ConvertibleToDouble>(
lhs: L, rhs: UnitValue<R> lhs: Double, rhs: UnitValue<R>
) )
-> UnitValue<Double> -> UnitValue<Double>
{ {
.init(value: lhs.doubleValue * rhs.value, unit: rhs.unit) .init(value: lhs * rhs.value, unit: rhs.unit)
} }
/// The result will have the `unit` of the left hand side value. /// The result will have the `unit` of the left hand side value.