Minimum implementation. \param x first operand \param y second operand \return minimum value
| 2007 | /// \param y second operand |
| 2008 | /// \return minimum value |
| 2009 | static expr fmin(float x, float y) |
| 2010 | { |
| 2011 | #if HALF_ENABLE_CPP11_CMATH |
| 2012 | return expr(std::fmin(x, y)); |
| 2013 | #else |
| 2014 | if(builtin_isnan(x)) |
| 2015 | return expr(y); |
| 2016 | if(builtin_isnan(y)) |
| 2017 | return expr(x); |
| 2018 | return expr(std::min(x, y)); |
| 2019 | #endif |
| 2020 | } |
| 2021 | |
| 2022 | /// Maximum implementation. |
| 2023 | /// \param x first operand |
nothing calls this directly
no test coverage detected