Thread: CAST question

  1. #16
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Waterloo, Texas
    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.
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
        return std::pow
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;

  2. #17
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Visalia, CA, USA
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Newbie cast question
    By 200thhorseman in forum C++ Programming
    Replies: 4
    Last Post: 07-05-2009, 02:25 AM
  2. another do while question
    By kbpsu in forum C++ Programming
    Replies: 3
    Last Post: 03-23-2009, 12:14 PM
  3. Question...
    By TechWins in forum A Brief History of
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  4. question
    By Gil22 in forum C++ Programming
    Replies: 2
    Last Post: 03-31-2003, 08:36 PM
  5. opengl DC question
    By SAMSAM in forum Game Programming
    Replies: 6
    Last Post: 02-26-2003, 09:22 PM