You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Rounds the given floating point number to an integer, away from zero.
/// Uses a dedicated hardware instruction when available.
/// This is the same as calling the builtin @round
Based upon the documentation I would expect the following behaviour:
/// Rounds the given floating point number to the nearest integer, in case of two equidistant integers it rounds away from zero.
/// Uses a dedicated hardware instruction when available.
/// This is the same as calling the builtin @round
The text was updated successfully, but these errors were encountered:
As per documentation the behaviour is described as such for std.math.round() and @round
https://github.com/ziglang/zig/blob/956f53beb09c07925970453d4c178c6feb53ba70/lib/std/math.zig#L1217C50-L1217C57
Based upon the documentation I would expect the following behaviour:
However, these @round to
0
and-2
respectively.Suggestion: Change the documentation to
The text was updated successfully, but these errors were encountered: