* @brief Return the clamped value between 0.0f and 1.0f. * * If @c a is NaN then zero will be returned for that lane. */
| 234 | * If @c a is NaN then zero will be returned for that lane. |
| 235 | */ |
| 236 | ASTCENC_SIMD_INLINE vfloat4 clampzo(vfloat4 a) |
| 237 | { |
| 238 | // Do not reorder - second operand will return if either is NaN |
| 239 | return min(max(a, vfloat4::zero()), 1.0f); |
| 240 | } |
| 241 | |
| 242 | /** |
| 243 | * @brief Return the horizontal minimum of a vector. |