GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
expj.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2006 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 #ifndef INCLUDED_GR_EXPJ_H
11 #define INCLUDED_GR_EXPJ_H
12 
13 #include <gnuradio/api.h>
14 #include <gnuradio/sincos.h>
15 #include <gnuradio/types.h>
16 
17 static inline gr_complex gr_expj(float phase)
18 {
19  float t_imag, t_real;
20  gr::sincosf(phase, &t_imag, &t_real);
21  return gr_complex(t_real, t_imag);
22 }
23 
24 
25 #endif /* INCLUDED_GR_EXPJ_H */
static gr_complex gr_expj(float phase)
Definition: expj.h:17
std::complex< float > gr_complex
Definition: gr_complex.h:15
void sincosf(float x, float *sinx, float *cosx)
Definition: sincos.h:49