Chromium Code Reviews| Index: src/utils.h |
| diff --git a/src/utils.h b/src/utils.h |
| index 5680384196d2c870cd519f420d34bb84337fb881..4a08319044bf7f0768970f539a1a41ac3f298747 100644 |
| --- a/src/utils.h |
| +++ b/src/utils.h |
| @@ -251,6 +251,13 @@ T Min(T a, T b) { |
| } |
| +// Returns the absolute value of its argument. |
| +template <typename T> |
| +T Abs(T a) { |
| + return a < 0 ? -a : a; |
| +} |
| + |
| + |
| // Returns the negative absolute value of its argument. |
| template <typename T> |
| T NegAbs(T a) { |