diff options
Diffstat (limited to 'lib/std/math/complex.zig')
| -rw-r--r-- | lib/std/math/complex.zig | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/std/math/complex.zig b/lib/std/math/complex.zig index 8b9e8befab..8398d0a69a 100644 --- a/lib/std/math/complex.zig +++ b/lib/std/math/complex.zig @@ -120,7 +120,7 @@ pub fn Complex(comptime T: type) type { const epsilon = 0.0001; -test "complex.add" { +test "add" { const a = Complex(f32).init(5, 3); const b = Complex(f32).init(2, 7); const c = a.add(b); @@ -128,7 +128,7 @@ test "complex.add" { try testing.expect(c.re == 7 and c.im == 10); } -test "complex.sub" { +test "sub" { const a = Complex(f32).init(5, 3); const b = Complex(f32).init(2, 7); const c = a.sub(b); @@ -136,7 +136,7 @@ test "complex.sub" { try testing.expect(c.re == 3 and c.im == -4); } -test "complex.mul" { +test "mul" { const a = Complex(f32).init(5, 3); const b = Complex(f32).init(2, 7); const c = a.mul(b); @@ -144,7 +144,7 @@ test "complex.mul" { try testing.expect(c.re == -11 and c.im == 41); } -test "complex.div" { +test "div" { const a = Complex(f32).init(5, 3); const b = Complex(f32).init(2, 7); const c = a.div(b); @@ -153,28 +153,28 @@ test "complex.div" { math.approxEqAbs(f32, c.im, @as(f32, -29) / 53, epsilon)); } -test "complex.conjugate" { +test "conjugate" { const a = Complex(f32).init(5, 3); const c = a.conjugate(); try testing.expect(c.re == 5 and c.im == -3); } -test "complex.neg" { +test "neg" { const a = Complex(f32).init(5, 3); const c = a.neg(); try testing.expect(c.re == -5 and c.im == -3); } -test "complex.mulbyi" { +test "mulbyi" { const a = Complex(f32).init(5, 3); const c = a.mulbyi(); try testing.expect(c.re == -3 and c.im == 5); } -test "complex.reciprocal" { +test "reciprocal" { const a = Complex(f32).init(5, 3); const c = a.reciprocal(); @@ -182,7 +182,7 @@ test "complex.reciprocal" { math.approxEqAbs(f32, c.im, @as(f32, -3) / 34, epsilon)); } -test "complex.magnitude" { +test "magnitude" { const a = Complex(f32).init(5, 3); const c = a.magnitude(); |
