| author | |
| committer | |
| log | 5af5d87ad2227b6a7b5347c7217312ef8a83de12 |
| tree | 6a6b4384698d449ccf0a46497ba85650f06367d6 |
| parent | 461036069934c9cbafbc24c5c3acc68e55bde912 |
1 files changed, 1 insertions(+), 0 deletions(-)
lib/std/math.zig+1| ... | ... | @@ -743,6 +743,7 @@ fn testOverflow() !void { |
| 743 | 743 | /// Returns the absolute value of x, where x is a value of a signed integer type. |
| 744 | 744 | /// Does not convert and returns a value of a signed integer type. |
| 745 | 745 | /// Use `absCast` if you want to convert the result and get an unsigned type. |
| 746 | /// Use `@fabs` if you need the absolute value of a floating point value. | |
| 746 | 747 | pub fn absInt(x: anytype) !@TypeOf(x) { |
| 747 | 748 | const T = @TypeOf(x); |
| 748 | 749 | return switch (@typeInfo(T)) { |