From 3370e60dd96828db6f9d1da36e71064303e97de6 Mon Sep 17 00:00:00 2001 From: Marc Tiehuis Date: Thu, 2 May 2019 19:03:49 +1200 Subject: std.math: Correct math.nan usage in cos --- std/math/cos.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'std/math/cos.zig') diff --git a/std/math/cos.zig b/std/math/cos.zig index 6d0cc80c31..dc4aff59d6 100644 --- a/std/math/cos.zig +++ b/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; -- cgit v1.2.3