GNU Radio Manual and C++ API Reference
3.9.1.0
The Free & Open Software Radio Ecosystem
sincos.h
Go to the documentation of this file.
1
/* -*- c++ -*- */
2
/*
3
* Copyright 2002,2004 Free Software Foundation, Inc.
4
*
5
* This file is part of GNU Radio
6
*
7
* SPDX-License-Identifier: GPL-3.0-or-later
8
*
9
*/
10
11
#ifndef INCLUDED_GR_SINCOS_H
12
#define INCLUDED_GR_SINCOS_H
13
14
#include <
gnuradio/api.h
>
15
#include <cmath>
16
17
namespace
gr
{
18
19
#if defined(HAVE_SINCOS)
20
21
inline
void
sincos
(
double
x,
double
* sinx,
double
* cosx) {
::sincos
(x, sinx, cosx); }
22
23
#else
24
25
inline
void
sincos
(
double
x,
double
* sinx,
double
* cosx)
26
{
27
*sinx = ::sin(x);
28
*cosx = ::cos(x);
29
}
30
31
#endif
32
33
// ----------------------------------------------------------------
34
35
#if defined(HAVE_SINCOSF)
36
37
inline
void
sincosf
(
float
x,
float
* sinx,
float
* cosx) {
::sincosf
(x, sinx, cosx); }
38
39
#elif defined(HAVE_SINF) && defined(HAVE_COSF)
40
41
inline
void
sincosf
(
float
x,
float
* sinx,
float
* cosx)
42
{
43
*sinx = ::sinf(x);
44
*cosx = ::cosf(x);
45
}
46
47
#else
48
49
inline
void
sincosf
(
float
x,
float
* sinx,
float
* cosx)
50
{
51
*sinx = ::sin(x);
52
*cosx = ::cos(x);
53
}
54
55
#endif
56
57
}
// namespace gr
58
59
#endif
/* INCLUDED_GR_SINCOS_H */
gr::sincosf
void sincosf(float x, float *sinx, float *cosx)
Definition:
sincos.h:49
gr::sincos
void sincos(double x, double *sinx, double *cosx)
Definition:
sincos.h:25
api.h
gr
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition:
basic_block.h:29
gnuradio-runtime
include
gnuradio
sincos.h
Generated by
1.8.17