How many digits of PI to use?
For most games, you can get away with 3.14 but I usually use 3.14159 because that''s all I can usually remember without a calculator.
How about this:
In float.h on MSVC++ 6 the #defined digits of precision are 6 for floats and 15 for doubles. Stick ~20 digits in your #define/const, let the compiler sort out how much is used.
--------------------------
I guess this is where most people put a famous quote...
"Everything is funnier with monkey''s" - Unknown
In float.h on MSVC++ 6 the #defined digits of precision are 6 for floats and 15 for doubles. Stick ~20 digits in your #define/const, let the compiler sort out how much is used.
--------------------------
I guess this is where most people put a famous quote...
"Everything is funnier with monkey''s" - Unknown
--------------------------I guess this is where most people put a famous quote..."Everything is funnier with monkey''s" - Unknown
long doubles are 18 digits of precision.
Null and Void
At least I don't know COBOL...
http://www.crosswinds.net/~druidgames/
Null and Void
At least I don't know COBOL...
http://www.crosswinds.net/~druidgames/
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement