MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / clamp

Function clamp

Source/astcenc_vecmathlib_sve_8.h:714–717  ·  view source on GitHub ↗

* @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. */

Source from the content-addressed store, hash-verified

712 * then @c min will be returned for that lane.
713 */
714ASTCENC_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.

Callers 1

clampzoFunction · 0.70

Calls 2

minFunction · 0.70
maxFunction · 0.70

Tested by

no test coverage detected