CORDIC_FIXED
sample = cordic_calc_iq(CORDIC_FIXED(theta));
samples[i] = cordic_calc_iq(CORDIC_FIXED(angle));
theta = CORDIC_FIXED(theta);
theta = ((theta + CORDIC_FIXED(180) * signtheta) % CORDIC_FIXED(360)) -
CORDIC_FIXED(180) * signtheta;
theta -= CORDIC_FIXED(180);
theta += CORDIC_FIXED(180);