aboutsummaryrefslogtreecommitdiff
path: root/lib/std/math/complex/atan.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-06-24 16:58:19 -0700
committerGitHub <noreply@github.com>2023-06-24 16:58:19 -0700
commit146b79af153bbd5dafda0ba12a040385c7fc58f8 (patch)
tree67e3db8b444d65c667e314770fc983a7fc8ba293 /lib/std/math/complex/atan.zig
parent13853bef0df3c90633021850cc6d6abaeea03282 (diff)
parent21ac0beb436f49fe49c6982a872f2dc48e4bea5e (diff)
downloadzig-146b79af153bbd5dafda0ba12a040385c7fc58f8.tar.gz
zig-146b79af153bbd5dafda0ba12a040385c7fc58f8.zip
Merge pull request #16163 from mlugg/feat/builtins-infer-dest-ty
Infer destination type of cast builtins using result type
Diffstat (limited to 'lib/std/math/complex/atan.zig')
-rw-r--r--lib/std/math/complex/atan.zig4
1 files changed, 2 insertions, 2 deletions
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;
}