* @brief Return the clamped value between min and max. * * It is assumed that neither @c min nor @c max are NaN values. If @c a is NaN * then @c min will be returned for that lane. */
| 745 | * then @c min will be returned for that lane. |
| 746 | */ |
| 747 | ASTCENC_SIMD_INLINE vfloat clamp(float minv, float maxv, vfloat a) |
| 748 | { |
| 749 | return min(max(a, minv), maxv); |
| 750 | } |
| 751 | |
| 752 | /** |
| 753 | * @brief Return a clamped value between 0.0f and 1.0f. |