| ... | @@ -22,10 +22,10 @@ const std = @import("../index.zig"); | ... | @@ -22,10 +22,10 @@ const std = @import("../index.zig"); |
| 22 | const math = std.math; | 22 | const math = std.math; |
| 23 | const assert = std.debug.assert; | 23 | const assert = std.debug.assert; |
| 24 | | 24 | |
| 25 | pub fn atan2(comptime T: type, x: T, y: T) T { | 25 | pub fn atan2(comptime T: type, y: T, x: T) T { |
| 26 | return switch (T) { | 26 | return switch (T) { |
| 27 | f32 => atan2_32(x, y), | 27 | f32 => atan2_32(y, x), |
| 28 | f64 => atan2_64(x, y), | 28 | f64 => atan2_64(y, x), |
| 29 | else => @compileError("atan2 not implemented for " ++ @typeName(T)), | 29 | else => @compileError("atan2 not implemented for " ++ @typeName(T)), |
| 30 | }; | 30 | }; |
| 31 | } | 31 | } |