I'm confused about this template example on: https://www.cplusplus.com/doc/oldtutorial/templates/
If I called function with the values GetMin(1, 0.1);I get a result of 0. Assuming it's incorrect, how would you do it correctly while still returning the result as its original type (Meaning you can't set the return type of double and convert the result to a double).
template <class T, class U>
T GetMin (T a, U b) {
return (a<b?a:b);
}