Просмотр исходного кода

LibM: Implement tanf() in terms of tan() with casts

Lazy, but it works for now. :^)
Linus Groh 4 лет назад
Родитель
Сommit
caa8f3d3bf
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      Userland/Libraries/LibM/math.cpp

+ 5 - 0
Userland/Libraries/LibM/math.cpp

@@ -445,6 +445,11 @@ double tan(double angle) NOEXCEPT
     return ampsin(angle) / ampsin(M_PI_2 + angle);
 }
 
+float tanf(float angle) NOEXCEPT
+{
+    return (float)tan((double)angle);
+}
+
 double sqrt(double x) NOEXCEPT
 {
     double res;