Commit 3370e60dd9

Marc Tiehuis <marctiehuis@gmail.com>
2019-05-02 09:03:49
std.math: Correct math.nan usage in cos
1 parent 89d71a9
Changed files (1)
std
math
std/math/cos.zig
@@ -48,7 +48,7 @@ fn cos_(comptime T: type, x_: T) T {
 
     var x = x_;
     if (math.isNan(x) or math.isInf(x)) {
-        return math.nan(f32);
+        return math.nan(T);
     }
 
     var sign = false;