Minimum implementation. \param x first operand \param y second operand \return minimum value
| 2020 | /// \param y second operand |
| 2021 | /// \return minimum value |
| 2022 | static expr fmin(float x, float y) |
| 2023 | { |
| 2024 | #if HALF_ENABLE_CPP11_CMATH |
| 2025 | return expr(std::fmin(x, y)); |
| 2026 | #else |
| 2027 | if(builtin_isnan(x)) |
| 2028 | return expr(y); |
| 2029 | if(builtin_isnan(y)) |
| 2030 | return expr(x); |
| 2031 | return expr(std::min(x, y)); |
| 2032 | #endif |
| 2033 | } |
| 2034 | |
| 2035 | /// Maximum implementation. |
| 2036 | /// \param x first operand |
nothing calls this directly
no test coverage detected