As I always say "you can take the man out of C, but you can't take the C out of the man". That's my diatribe anyway.
As I always say "you can take the man out of C, but you can't take the C out of the man". That's my diatribe anyway.
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
That is very true. That is why I basically have had to force myself into treating C++ as a different language than C. I know that isn't necessary, but since many folks are learning C++ first nowdays it would is advantageous for me to program the same way everyone will be programming soon.