diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-11-07 18:52:09 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-11-08 15:57:25 -0500 |
| commit | aa0daea5415dd2a20e4d7c2fd047b7bcee6c9ea4 (patch) | |
| tree | b8634d38380eb6fd32ca614678785f36167ca7b2 /lib/std/math/complex.zig | |
| parent | a2acc2787242fdee189ec4197c0dd847b8245139 (diff) | |
| download | zig-aa0daea5415dd2a20e4d7c2fd047b7bcee6c9ea4.tar.gz zig-aa0daea5415dd2a20e4d7c2fd047b7bcee6c9ea4.zip | |
update more of the std lib to use `@as`
Diffstat (limited to 'lib/std/math/complex.zig')
| -rw-r--r-- | lib/std/math/complex.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/std/math/complex.zig b/lib/std/math/complex.zig index e5574f9cee..8bff2313fc 100644 --- a/lib/std/math/complex.zig +++ b/lib/std/math/complex.zig @@ -133,8 +133,8 @@ test "complex.div" { const b = Complex(f32).new(2, 7); const c = a.div(b); - testing.expect(math.approxEq(f32, c.re, f32(31) / 53, epsilon) and - math.approxEq(f32, c.im, f32(-29) / 53, epsilon)); + testing.expect(math.approxEq(f32, c.re, @as(f32, 31) / 53, epsilon) and + math.approxEq(f32, c.im, @as(f32, -29) / 53, epsilon)); } test "complex.conjugate" { @@ -148,8 +148,8 @@ test "complex.reciprocal" { const a = Complex(f32).new(5, 3); const c = a.reciprocal(); - testing.expect(math.approxEq(f32, c.re, f32(5) / 34, epsilon) and - math.approxEq(f32, c.im, f32(-3) / 34, epsilon)); + testing.expect(math.approxEq(f32, c.re, @as(f32, 5) / 34, epsilon) and + math.approxEq(f32, c.im, @as(f32, -3) / 34, epsilon)); } test "complex.magnitude" { |
