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

Function clampzo

Source/astcenc_vecmathlib_common_4.h:236–240  ·  view source on GitHub ↗

* @brief Return the clamped value between 0.0f and 1.0f. * * If @c a is NaN then zero will be returned for that lane. */

Source from the content-addressed store, hash-verified

234 * If @c a is NaN then zero will be returned for that lane.
235 */
236ASTCENC_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.

Callers

nothing calls this directly

Calls 2

minFunction · 0.70
maxFunction · 0.70

Tested by

no test coverage detected