Skip to content

Trigonometric functions


acos function

template <typename T1, KFR_ENABLE_IF(is_numeric<T1>)>
flt_type<T1> acos(const T1 &x)

Returns the arc cosine of x. The returned angle is in the range 0 through \(\pi\) .


asin function

template <typename T1, KFR_ENABLE_IF(is_numeric<T1>)>
flt_type<T1> asin(const T1 &x)

Returns the arc sine of x. The returned angle is in the range \(-\pi/2\) through \(\pi/2\) .


atan function

template <typename T1, KFR_ENABLE_IF(is_numeric<T1>)>
flt_type<T1> atan(const T1 &x)

Returns the arc tangent of x. The returned angle is in the range \(-\pi/2\) through \(\pi/2\) .


atan2 function

template <typename T1, typename T2,
          KFR_ENABLE_IF(is_numeric_args<T1, T2>)>
std::common_type_t<T1, T2> atan2(const T1 &x, const T2 &y)

Returns the arc tangent of y/x using the signs of arguments to determine the correct quadrant.


atan2deg function

template <typename T1, typename T2,
          KFR_ENABLE_IF(is_numeric_args<T1, T2>)>
std::common_type_t<T1, T2> atan2deg(const T1 &x,
                                    const T2 &y)

Returns the arc tangent of y/x (expressed in degrees) using the signs of arguments to determine the correct quadrant.


atandeg function

template <typename T1, KFR_ENABLE_IF(is_numeric<T1>)>
flt_type<T1> atandeg(const T1 &x)

Returns the arc tangent of the x, expressed in degrees. The returned angle is in the range -90 through 90.


cos function

template <typename T1, KFR_ENABLE_IF(is_numeric<T1>)>
flt_type<T1> cos(const T1 &x)

Returns the trigonometric cosine of x.


cos2x function

template <typename T> T cos2x(const T &sinx, const T &cosx)

Returns the trigonometric cosine of the angle 2x using already computed sin(x) and cos(x).


cos3x function

template <typename T> T cos3x(const T &sinx, const T &cosx)

Returns the trigonometric cosine of the angle 3x using already computed sin(x) and cos(x).


cosdeg function

template <typename T1, KFR_ENABLE_IF(is_numeric<T1>)>
flt_type<T1> cosdeg(const T1 &x)

Returns the trigonometric cosine of the x (expressed in degrees).


cossin function

template <typename T1, KFR_ENABLE_IF(is_numeric<T1>)>
flt_type<T1> cossin(const T1 &x)

Returns the trigonometric cosine of the even elements of the x and sine of the odd elements. x must be a vector.


cossindeg function

template <typename T1, KFR_ENABLE_IF(is_numeric<T1>)>
flt_type<T1> cossindeg(const T1 &x)

Returns the trigonometric cosine of the even elements of the x and sine of the odd elements. x must be a vector and expressed in degrees.


fastcos function

template <typename T1, KFR_ENABLE_IF(is_numeric<T1>)>
flt_type<T1> fastcos(const T1 &x)

Returns an approximation of the trigonometric cosine of x.


fastcosdeg function

template <typename T1, KFR_ENABLE_IF(is_numeric<T1>)>
flt_type<T1> fastcosdeg(const T1 &x)

Returns an approximation of the trigonometric cosine of the x (expressed in degrees).


fastsin function

template <typename T1, KFR_ENABLE_IF(is_numeric<T1>)>
flt_type<T1> fastsin(const T1 &x)

Returns an approximation of the trigonometric sine of x.


fastsindeg function

template <typename T1, KFR_ENABLE_IF(is_numeric<T1>)>
flt_type<T1> fastsindeg(const T1 &x)

Returns an approximation of the trigonometric sine of the x (expressed in degrees).


sin function

template <typename T1, KFR_ENABLE_IF(is_numeric<T1>)>
flt_type<T1> sin(const T1 &x)

Returns the trigonometric sine of x.


sin2x function

template <typename T> T sin2x(const T &sinx, const T &cosx)

Returns the trigonometric sine of the angle 2x using sin(x) and cos(x).


sin3x function

template <typename T> T sin3x(const T &sinx, const T &cosx)

Returns the trigonometric sine of the angle 3x using already computed sin(x) and cos(x).


sinc function

template <typename T1, KFR_ENABLE_IF(is_numeric<T1>)>
flt_type<T1> sinc(const T1 &x)

Returns the sinc function of x.

\[ sinc(x) = \frac{sin(x)}{x} \]

sincos function

template <typename T1, KFR_ENABLE_IF(is_numeric<T1>)>
flt_type<T1> sincos(const T1 &x)

Returns the trigonometric sine of the even elements of the x and cosine of the odd elements. x must be a vector.


sincosdeg function

template <typename T1, KFR_ENABLE_IF(is_numeric<T1>)>
flt_type<T1> sincosdeg(const T1 &x)

Returns the trigonometric sine of the even elements of the x and cosine of the odd elements. x must be a vector and expressed in degrees.


sindeg function

template <typename T1, KFR_ENABLE_IF(is_numeric<T1>)>
flt_type<T1> sindeg(const T1 &x)

Returns the trigonometric sine of the x (expressed in degrees).


Auto-generated from sources, Revision 5191a48df06ea47104ca67db19fa82058d09c20a, https://github.com/kfrlib/kfr/blob/5191a48df06ea47104ca67db19fa82058d09c20a/include/kfr/