Dawoodoz / DFPSR

Fast realtime softare rendering library for C++14 using SSE/AVX/NEON. 2D, 3D and isometric rendering with minimal system dependencies.
https://dawoodoz.com/dfpsr.html
78 stars 6 forks source link

Improved min and max functions #76

Closed Dawoodoz closed 1 year ago

Dawoodoz commented 1 year ago

To reduce mixed namespaces and allow writing max(a, b, c, d, e) instead of std::max(std::max(std::max(std::max(a, b), c), d), e).

The two argument functions are only applied after non-template functions in simd.h did not match (according to C++ standard for resolving overloaded functions). The tail recursive functions should be able to call min and max written for specific types that have intrinsic functions.