Created c++ discrete trig approx algorithim.