int Abs(int a) { return a > 0 ? a : -a; }float Abs(float a) { return a > 0.0f ? a : -a; }double Abs(double a) { return a > 0.0 ? a : -a; }
不错