4 ms·
Zig defines checked versions of mathematical operators in its std lib [0], which return an Error Union. It's like an Optional (which Zig also has), but with an
by AnIdiotOnTheNet 8y ago
Zig defines checked versions of mathematical operators in its std lib [0], which return an Error Union. It's like an Optional (which Zig also has), but with an error instead of null. Your code can choose to handle this error however it wants.
[0] https://ziglang.org/documentation/master/#Standard-Library-Math-Functions https://ziglang.org/documentation/master/#Standard-Library-M...