# Trigonometric functions

xtensor provides the following trigonometric functions for xexpressions and scalars:

Defined in `xtensor/xmath.hpp`

template <class E>
auto `xt::``sin`(E &&e)

  Sine function.

  Returns an xfunction for the element-wise sine of e (measured in radians).

  Return
    an xfunction
  Parameters
    - `e`: an xexpression

template <class E>
auto `xt::``cos`(E &&e)

  Cosine function.

  Returns an xfunction for the element-wise cosine of e (measured in radians).

  Return
    an xfunction
  Parameters
    - `e`: an xexpression

template <class E>
auto `xt::``tan`(E &&e)

  Tangent function.

  Returns an xfunction for the element-wise tangent of e (measured in radians).

  Return
    an xfunction
  Parameters
    - `e`: an xexpression

template <class E>
auto `xt::``asin`(E &&e)

  Arcsine function.

  Returns an xfunction for the element-wise arcsine of e.

  Return
    an xfunction
  Parameters
    - `e`: an xexpression

template <class E>
auto `xt::``acos`(E &&e)

  Arccosine function.

  Returns an xfunction for the element-wise arccosine of e.

  Return
    an xfunction
  Parameters
    - `e`: an xexpression

template <class E>
auto `xt::``atan`(E &&e)

  Arctangent function.

  Returns an xfunction for the element-wise arctangent of e.

  Return
    an xfunction
  Parameters
    - `e`: an xexpression

template <class E1, class E2>
auto `xt::``atan2`(E1 &&e1, E2 &&e2)

  Artangent function, using signs to determine quadrants.

  Returns an xfunction for the element-wise arctangent of e1 / e2, using the signs of arguments to determine the correct quadrant.

  Return
    an xfunction
  Note
    e1 and e2 can’t be both scalars.
  Parameters
    - `e1`: an xexpression or a scalar
    - `e2`: an xexpression or a scalar