From f26dda21171e26f44aeec8c59a75bbb3331eeb2e Mon Sep 17 00:00:00 2001 From: mlugg Date: Thu, 22 Jun 2023 18:46:56 +0100 Subject: all: migrate code to new cast builtin syntax Most of this migration was performed automatically with `zig fmt`. There were a few exceptions which I had to manually fix: * `@alignCast` and `@addrSpaceCast` cannot be automatically rewritten * `@truncate`'s fixup is incorrect for vectors * Test cases are not formatted, and their error locations change --- lib/std/math/complex/atan.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/std/math/complex/atan.zig') diff --git a/lib/std/math/complex/atan.zig b/lib/std/math/complex/atan.zig index 56c199016d..381fc43f7d 100644 --- a/lib/std/math/complex/atan.zig +++ b/lib/std/math/complex/atan.zig @@ -32,7 +32,7 @@ fn redupif32(x: f32) f32 { t -= 0.5; } - const u = @floatFromInt(f32, @intFromFloat(i32, t)); + const u = @as(f32, @floatFromInt(@as(i32, @intFromFloat(t)))); return ((x - u * DP1) - u * DP2) - t * DP3; } @@ -81,7 +81,7 @@ fn redupif64(x: f64) f64 { t -= 0.5; } - const u = @floatFromInt(f64, @intFromFloat(i64, t)); + const u = @as(f64, @floatFromInt(@as(i64, @intFromFloat(t)))); return ((x - u * DP1) - u * DP2) - t * DP3; } -- cgit v1.2.3