C++ · Functions
The standard library's abs works on both int and double, and the same two features let your own functions do that.
abs
int
double