My general rule of thumb is to never make performance decisions without the aid of a profiler (aside from no brainers like avoiding unnecessary copies). And profilers are generally pretty good about letting you know which functions should have been inlined but weren't and really bad about letting you know about which functions that shouldn't have been inlined but were. Therefore I tend to write code for maximum clarity rather than performance and leave decisions like whether or not code should be inlined until when explicit performance tuning is done.
all the mainstream languages that offer operators like &&, || do short-circuit evaluation on them.
Assuming that they aren't overloaded anyways. In C++ if you overload && or || then short circuit evaluation no longer applies. Some languages don't allow operator overloading on logical and and logical or for this reason.
timeBeginPeriod() affects the system global time period. Windows will use the highest resolution (lowest value) requested by any process on the system. This basically means that you can reliably increase resolution, but not reliably decrease it.
Some comments. 1) You should really check the return value of all the functions you call. For Windows functions if there's an error, generally GetLastError() will tell you what went wrong. 2) Calling ZeroMemory() on a structure after setting member variables is counter productive. 3) Calling GetMessage() with an hWnd parameter will not catch WM_QUIT messages created by PostQuitMessage().
The waste of time reinventing the wheel every time you need a linked list aside, that's something you're only allowed to say if you can write one correctly. Not only did you have to write four times the amount of code that using std::list would have taken, your code contains at least one major bug, requires more effort to use than std::list, and only allows one linked list in the entire program.
Edit: reponse to added text:
You can't remove from STL data structures while in a loop either
Bullshit. And the problem isn't removing in a loop, the problem is that your node removal code is broken.
I'm not really sure those all constitute options. ncurses is designed for use with console windows, which OpenGL programs generally don't use and sendkeys is for sending input to a different window, not for receiving input. It would help if you mentioned which libraries you using/how you are creating your OpenGL window.
You don't need any inverse functions to answer the questions. You have the right triangle and two of the sides so you can calculate the remaining side and the cosine, sine or tangent of the angles without needing to find the exact value of the angles.
Draw a line from the center of the circle to the tangent point. This line also has a length of g and since it's a tangent point then this forms a right triangle with the hypotenuse of length r. Adjacent to the angle alpha is one of the angles of the triangle. What is the cosine of that angle? Since alpha is 180 minus that angle, how does cosine of alpha relate to cosine of that angle?
The C++ standard has a wonderfully confusing set of definitions that often are at ninety degrees with common sense. Section 8.5 of the current version contains all the details, but when POD types are "default initialized" that initialization is as if they had been initialized with 0's. On the other hand, "default initialization" only happens in a limited set of occasions, so "default initialization" doesn't happen by default most of the time. Most of the time when a POD variable lacks an initializer it is uninitialized rather than "default initialized" and thus has an indeterminate value.
IIRC, this particular confusion was the result of templates being added to the language and the desire for the expression T() to have a reliable meaning for when T is a POD type. Before that, C++ avoided the confusing term of default initialization and only had zero initialization and uninitialized values. I don't care enough to fact check this paragraph, however.