Skip to content

Suggestion: rename last two parameters of mat4_perspective in mathc.h to speaking names #40

@ghost

Description

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 or f are. Turns out it's "near clipping" and "far clipping":

mfloat_t *mat4_perspective(mfloat_t *result, mfloat_t fov_y, mfloat_t aspect, mfloat_t n, mfloat_t f)

Therefore, I recommend renaming them to znear and zfar 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions