std.math: Correct math.nan usage in cos

This commit is contained in:
Marc Tiehuis 2019-05-02 19:03:49 +12:00
parent 89d71a960b
commit 3370e60dd9

View File

@ -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;