| ... | ... | @@ -111,11 +111,11 @@ pub const inf = @import("math/inf.zig").inf; |
| 111 | 111 | /// the specified tolerance. |
| 112 | 112 | /// |
| 113 | 113 | /// The `tolerance` parameter is the absolute tolerance used when determining if |
| 114 | | /// the two numbers are close enough, a good value for this parameter is a small |
| 114 | /// the two numbers are close enough; a good value for this parameter is a small |
| 115 | 115 | /// multiple of `epsilon(T)`. |
| 116 | 116 | /// |
| 117 | | /// Note that this function is recommended for for comparing small numbers |
| 118 | | /// around zero, using `approxEqRel` is suggested otherwise. |
| 117 | /// Note that this function is recommended for comparing small numbers |
| 118 | /// around zero; using `approxEqRel` is suggested otherwise. |
| 119 | 119 | /// |
| 120 | 120 | /// NaN values are never considered equal to any value. |
| 121 | 121 | pub fn approxEqAbs(comptime T: type, x: T, y: T, tolerance: T) bool { |
| ... | ... | @@ -138,7 +138,7 @@ pub fn approxEqAbs(comptime T: type, x: T, y: T, tolerance: T) bool { |
| 138 | 138 | /// than zero. |
| 139 | 139 | /// |
| 140 | 140 | /// The `tolerance` parameter is the relative tolerance used when determining if |
| 141 | | /// the two numbers are close enough, a good value for this parameter is usually |
| 141 | /// the two numbers are close enough; a good value for this parameter is usually |
| 142 | 142 | /// `sqrt(epsilon(T))`, meaning that the two numbers are considered equal if at |
| 143 | 143 | /// least half of the digits are equal. |
| 144 | 144 | /// |