Skip to content

macro implementation of glm_max and glm_min #493

Description

@duarm

instead of the current glm_max and glm_imax function,, we could provide a single macro implementation which works for all types using c23 typeof, something like

#define MAX(a, b) ({           \
    typeof(a) _a = (a);        \
    typeof(b) _b = (b);        \
    _a > _b ? _a : _b;         \
})

Just an idea, not sure if it's worth it

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