#include <cordic.h>
Collaboration diagram for SPUC::cordic:

Public Member Functions | |
| cordic (int n=7) | |
| initializes tables and constants for the CORDIC algorithm | |
| long | vector_mag (complex< long > in) |
| Returns magnitude through CORDIC vectoring. | |
| double | vector_arg (complex< long > in) |
| Returns arg through CORDIC vectoring. | |
| complex< long > | rotate (complex< long > in, double angle) |
Public Attributes | |
| double * | arctan_lut |
| complex< long > * | stage |
| int | stages |
| double | vector_angle |
Protected Member Functions | |
| complex< long > | vector (complex< long > in) |
| Cordic vectoring calculates arg and magnitude. | |
Performs CORDIC rotations To rotate a vector through an angle of theta, we calculate:
x' = x cos(theta) - y sin(theta) y' = x sin(theta) + y cos(theta) Can be easily modified for hyperbolic and other functions
|
|
initializes tables and constants for the CORDIC algorithm
|
|
||||||||||||
|
|
|
|
Cordic vectoring calculates arg and magnitude.
|
|
|
Returns arg through CORDIC vectoring.
Here is the call graph for this function: ![]() |
|
|
Returns magnitude through CORDIC vectoring.
Here is the call graph for this function: ![]() |
|
|
|
|
|
|
|
|
|
|
|
|
1.4.4