aboutsummaryrefslogtreecommitdiff
path: root/lib/std/math.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2023-03-05 12:39:32 +0000
committerAndrew Kelley <andrew@ziglang.org>2023-04-12 12:06:19 -0400
commitccf670c2b04ebeb9db43eb9f5c47c6cf03e4b1d0 (patch)
tree3f7899bf6231500782af185ffe701ee66793e226 /lib/std/math.zig
parent602029bb2fb78048e46136784e717b57b8de8f2c (diff)
downloadzig-ccf670c2b04ebeb9db43eb9f5c47c6cf03e4b1d0.tar.gz
zig-ccf670c2b04ebeb9db43eb9f5c47c6cf03e4b1d0.zip
Zir: implement explicit block_comptime instruction
Resolves: #7056
Diffstat (limited to 'lib/std/math.zig')
-rw-r--r--lib/std/math.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/math.zig b/lib/std/math.zig
index 4d8550a8bc..65643d92d7 100644
--- a/lib/std/math.zig
+++ b/lib/std/math.zig
@@ -877,7 +877,7 @@ fn testDivFloor() !void {
/// zero.
pub fn divCeil(comptime T: type, numerator: T, denominator: T) !T {
@setRuntimeSafety(false);
- if (comptime std.meta.trait.isNumber(T) and denominator == 0) return error.DivisionByZero;
+ if ((comptime std.meta.trait.isNumber(T)) and denominator == 0) return error.DivisionByZero;
const info = @typeInfo(T);
switch (info) {
.ComptimeFloat, .Float => return @ceil(numerator / denominator),