* @brief Return a float rounded to the nearest integer value. */
| 873 | * @brief Return a float rounded to the nearest integer value. |
| 874 | */ |
| 875 | ASTCENC_SIMD_INLINE vfloat4 round(vfloat4 a) |
| 876 | { |
| 877 | assert(std::fegetround() == FE_TONEAREST); |
| 878 | return vfloat4(std::nearbyint(a.m[0]), |
| 879 | std::nearbyint(a.m[1]), |
| 880 | std::nearbyint(a.m[2]), |
| 881 | std::nearbyint(a.m[3])); |
| 882 | } |
| 883 | |
| 884 | /** |
| 885 | * @brief Return the horizontal minimum of a vector. |