mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
Merge c195278b9e into 9082b004b6
This commit is contained in:
commit
984598a262
1 changed files with 1 additions and 1 deletions
|
|
@ -102,7 +102,7 @@ pub fn approxEqAbs(comptime T: type, x: T, y: T, tolerance: T) bool {
|
|||
///
|
||||
/// NaN values are never considered equal to any value.
|
||||
pub fn approxEqRel(comptime T: type, x: T, y: T, tolerance: T) bool {
|
||||
assert(@typeInfo(T) == .float or @typeInfo(T) == .comptime_float);
|
||||
comptime assert(@typeInfo(T) == .float or @typeInfo(T) == .comptime_float);
|
||||
assert(tolerance > 0);
|
||||
|
||||
// Fast path for equal values (and signed zeros and infinites).
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue