aboutsummaryrefslogtreecommitdiff
path: root/lib/std/math/complex/sqrt.zig
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/math/complex/sqrt.zig')
-rw-r--r--lib/std/math/complex/sqrt.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/std/math/complex/sqrt.zig b/lib/std/math/complex/sqrt.zig
index 456d10aa85..fe2e8e6531 100644
--- a/lib/std/math/complex/sqrt.zig
+++ b/lib/std/math/complex/sqrt.zig
@@ -58,14 +58,14 @@ fn sqrt32(z: Complex(f32)) Complex(f32) {
if (dx >= 0) {
const t = @sqrt((dx + math.hypot(f64, dx, dy)) * 0.5);
return Complex(f32).init(
- @floatCast(f32, t),
- @floatCast(f32, dy / (2.0 * t)),
+ @as(f32, @floatCast(t)),
+ @as(f32, @floatCast(dy / (2.0 * t))),
);
} else {
const t = @sqrt((-dx + math.hypot(f64, dx, dy)) * 0.5);
return Complex(f32).init(
- @floatCast(f32, @fabs(y) / (2.0 * t)),
- @floatCast(f32, math.copysign(t, y)),
+ @as(f32, @floatCast(@fabs(y) / (2.0 * t))),
+ @as(f32, @floatCast(math.copysign(t, y))),
);
}
}