SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
Public Member Functions | Public Attributes | List of all members
leansdr::trig16 Struct Reference

#include <math.h>

+ Collaboration diagram for leansdr::trig16:

Public Member Functions

 trig16 ()
 
const complex< float > & expi (uint16_t a) const
 
const complex< float > & expi (float a) const
 

Public Attributes

complex< float > lut [65536]
 

Detailed Description

Definition at line 134 of file math.h.

Constructor & Destructor Documentation

◆ trig16()

leansdr::trig16::trig16 ( )
inline

Definition at line 137 of file math.h.

References leansdr::complex< T >::im, M_PI, and leansdr::complex< T >::re.

138  {
139  for (int a = 0; a < 65536; ++a)
140  {
141  float af = a * 2 * M_PI / 65536;
142  lut[a].re = cosf(af);
143  lut[a].im = sinf(af);
144  }
145  }
#define M_PI
Definition: rdsdemod.cpp:27
complex< float > lut[65536]
Definition: math.h:136

Member Function Documentation

◆ expi() [1/2]

const complex<float>& leansdr::trig16::expi ( uint16_t  a) const
inline

Definition at line 146 of file math.h.

147  {
148  return lut[a];
149  }
complex< float > lut[65536]
Definition: math.h:136

◆ expi() [2/2]

const complex<float>& leansdr::trig16::expi ( float  a) const
inline

Definition at line 151 of file math.h.

152  {
153  return expi((uint16_t)(int16_t)(int32_t)a);
154  }
short int16_t
Definition: rtptypes_win.h:43
unsigned short uint16_t
Definition: rtptypes_win.h:44
int int32_t
Definition: rtptypes_win.h:45
const complex< float > & expi(uint16_t a) const
Definition: math.h:146

Member Data Documentation

◆ lut

complex<float> leansdr::trig16::lut[65536]

Definition at line 136 of file math.h.


The documentation for this struct was generated from the following file: