aboutsummaryrefslogtreecommitdiff
path: root/lib/std/json.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-04-27 19:35:28 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-04-27 19:35:28 -0700
commit0ffe82e624f9334473758349219fe1dbcf3edb3b (patch)
tree6a03c1219eb2b836f8b0d58cf18e6d52e99dac4c /lib/std/json.zig
parentc26f7550f037e44fea51983eeb3f0adbb34d1d38 (diff)
downloadzig-0ffe82e624f9334473758349219fe1dbcf3edb3b.tar.gz
zig-0ffe82e624f9334473758349219fe1dbcf3edb3b.zip
std: use float builtins instead of std.math
Diffstat (limited to 'lib/std/json.zig')
-rw-r--r--lib/std/json.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/json.zig b/lib/std/json.zig
index c18f38754a..b670e488b2 100644
--- a/lib/std/json.zig
+++ b/lib/std/json.zig
@@ -1655,7 +1655,7 @@ fn parseInternal(
if (numberToken.is_integer)
return try std.fmt.parseInt(T, numberToken.slice(tokens.slice, tokens.i - 1), 10);
const float = try std.fmt.parseFloat(f128, numberToken.slice(tokens.slice, tokens.i - 1));
- if (std.math.round(float) != float) return error.InvalidNumber;
+ if (@round(float) != float) return error.InvalidNumber;
if (float > std.math.maxInt(T) or float < std.math.minInt(T)) return error.Overflow;
return @floatToInt(T, float);
},