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

Function clamp

Source/astcenc_vecmathlib_rvv_n.h:747–750  ·  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

745 * then @c min will be returned for that lane.
746 */
747ASTCENC_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.

Callers 1

clampzoFunction · 0.70

Calls 2

minFunction · 0.70
maxFunction · 0.70

Tested by

no test coverage detected