cos
Z cppreference.com
Składnia:
#include <cmath> double cos( double arg );
Funkcja cos() zwraca wartość cosinusa z arg, gdzie arg jest podany w radianach. Zwracana wartość należy do przedziału [-1,1]. Jeśli arg jest nieskończonością, to cos() zwróci NAN i wywoła wyjątek floating-point exception.
C++ dostarcza przeciążone wersje funkcji:
#include <cmath> float cos( float arg ); // to samo co cosf() w C99 long double cos( long double arg ); // to samo co cosl() w C99
Powiązane tematy: acos, asin, atan, atan2, cosh, sin, sinh, tan, tanh