Better handling of operations ?
This commit is contained in:
@@ -343,8 +343,8 @@ 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 - <T: ConvertibleToDouble>(
|
public static func - <L: ConvertibleToDouble, R: ConvertibleToDouble>(
|
||||||
lhs: UnitValue<T>, rhs: UnitValue<T>
|
lhs: UnitValue<L>, rhs: UnitValue<R>
|
||||||
)
|
)
|
||||||
-> UnitValue<Double>
|
-> UnitValue<Double>
|
||||||
{
|
{
|
||||||
@@ -352,8 +352,8 @@ 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 + <T: ConvertibleToDouble>(
|
public static func + <L: ConvertibleToDouble, R: ConvertibleToDouble>(
|
||||||
lhs: UnitValue<T>, rhs: UnitValue<T>
|
lhs: UnitValue<L>, rhs: UnitValue<R>
|
||||||
)
|
)
|
||||||
-> UnitValue<Double>
|
-> UnitValue<Double>
|
||||||
{
|
{
|
||||||
@@ -361,8 +361,8 @@ 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 * <T: ConvertibleToDouble>(
|
public static func * <L: ConvertibleToDouble, R: ConvertibleToDouble>(
|
||||||
lhs: UnitValue<T>, rhs: UnitValue<T>
|
lhs: UnitValue<L>, rhs: UnitValue<R>
|
||||||
)
|
)
|
||||||
-> UnitValue<Double>
|
-> UnitValue<Double>
|
||||||
{
|
{
|
||||||
@@ -370,8 +370,8 @@ 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 / <T: ConvertibleToDouble>(
|
public static func / <L: ConvertibleToDouble, R: ConvertibleToDouble>(
|
||||||
lhs: UnitValue<T>, rhs: UnitValue<T>
|
lhs: UnitValue<L>, rhs: UnitValue<R>
|
||||||
)
|
)
|
||||||
-> UnitValue<Double>
|
-> UnitValue<Double>
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user