Trigonometric functions¶
xtensor provides the following trigonometric functions for xexpressions and scalars:
Defined in xtensor/xmath.hpp
-
template<class
E
>
autoxt
::
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
>
autoxt
::
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
>
autoxt
::
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
>
autoxt
::
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
>
autoxt
::
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
>
autoxt
::
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
, classE2
>
autoxt
::
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 scalare2
: an xexpression or a scalar