Open ghost opened 4 years ago
near and far are names taken by Windows.h, so any other names would be slightly simpler to use.
What do you mean with "taken by Windows.h"? If you rename them in the header only they aren't in anyone's scope, so that shouldn't be an issue on a technical level. (You can still keep the old parameter names in the mathc.c
actual implementation file.) Or are you saying people would be confused by these names?
Edit: oh fascinating, seems like they're macros which is a problem. Good catch! What about znear
and zfar
then?
I had to google around and check out libglm usage to see what parameters a perspective transformation commonly takes (and yes I'm familiar with clipping planes and all, I just never used lowlevel OpenGL directly before) to figure out what on earth
n
orf
are. Turns out it's "near clipping" and "far clipping":Therefore, I recommend renaming them to
znear
andzfar
in the header since that will make it way easier both to guess and to google what they are used for. It may seem like a minor nitpick but this can really help a lot when there's otherwise no documentation available.Edit: proposal updated due to @RandyGaul 's remark