There is my code:
func singleInterpolation(value1: T, value2: T) -> T {
return value1 + (value2 - value1) / 2
}
I've got the error: Binary operator "-" cannot be applied to two T operands
Which protocol I need to use for fix that?
There is my code:
func singleInterpolation(value1: T, value2: T) -> T {
return value1 + (value2 - value1) / 2
}
I've got the error: Binary operator "-" cannot be applied to two T operands
Which protocol I need to use for fix that?