Skip to content

GB_MATH_NO_MATH_H's gb_tan doesn't handle values over half PI #43

@jimon

Description

@jimon

By mistake I've passed 45.0f to gb_mat4_perspective and everything was looking fine.
But when I've enabled GB_MATH_NO_MATH_H suddenly nothing worked anymore.

Apparently tanf does some wrap arounds inside, and current emulation doesn't do that.
After some googling I found that original code is probably coming from some old DSP code ( for example this ) and then idlib math included it with some improvements here.

Not a problem for me, but would be nice to fix it at some point 👍

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