imgui icon indicating copy to clipboard operation
imgui copied to clipboard

Use constexpr in default math functions where possible

Open kfish opened this issue 8 months ago • 5 comments

This allows some basic math, palette generation etc. to be done in constructors or at compile-time.

imgui_internal.h: Add constexpr (replace "static inline" with "static constexpr") in math functions. This also implements ImFabs and ImFmod explicitly as fabsf and fmodf are not necessarily constexpr. Other non-constexpr functions (anything involving transcendentals, sqrt etc) remain "static inline".

kfish avatar Jun 04 '24 20:06 kfish