* @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. */
| 712 | * then @c min will be returned for that lane. |
| 713 | */ |
| 714 | ASTCENC_SIMD_INLINE vfloat8 clamp(float minv, float maxv, vfloat8 a) |
| 715 | { |
| 716 | return min(max(a, minv), maxv); |
| 717 | } |
| 718 | |
| 719 | /** |
| 720 | * @brief Return a clamped value between 0.0f and 1.0f. |