| author | |
| committer | |
| log | 84391af7b8951735ec4719a6495ac37c032a1e36 |
| tree | 319c5d56b99c36585e1e018d47f5979111b35fe6 |
| parent | 1d998d5dce73d8d500dee5e41a3dca92a7f9b03e |
See #363
For Complex as a builtin type, see discussion in #9492 files changed, 1 insertions(+), 3 deletions(-)
std/math/complex/index.zig-1| ... | ... | @@ -23,7 +23,6 @@ pub const sqrt = @import("sqrt.zig").sqrt; |
| 23 | 23 | pub const tanh = @import("tanh.zig").tanh; |
| 24 | 24 | pub const tan = @import("tan.zig").tan; |
| 25 | 25 | |
| 26 | // NOTE: Make this a builtin at some point? | |
| 27 | 26 | pub fn Complex(comptime T: type) type { |
| 28 | 27 | return struct { |
| 29 | 28 | const Self = this; |
std/math/complex/sqrt.zig+1-2| ... | ... | @@ -4,8 +4,7 @@ const math = std.math; |
| 4 | 4 | const cmath = math.complex; |
| 5 | 5 | const Complex = cmath.Complex; |
| 6 | 6 | |
| 7 | // NOTE: Returning @typeOf(z) here causes issues when trying to access the value. This is | |
| 8 | // why we currently assign re, im parts to a new value explicitly for all tests. | |
| 7 | // TODO when #733 is solved this can be @typeOf(z) instead of Complex(@typeOf(z.re)) | |
| 9 | 8 | pub fn sqrt(z: var) Complex(@typeOf(z.re)) { |
| 10 | 9 | const T = @typeOf(z.re); |
| 11 | 10 |