update more of the std lib to use @as

This commit is contained in:
Andrew Kelley
2019-11-07 18:52:09 -05:00
parent a2acc27872
commit aa0daea541
28 changed files with 145 additions and 145 deletions

View File

@@ -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" {