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

Function clamp1f

Source/astcenc_mathlib.h:290–293  ·  view source on GitHub ↗

* @brief Clamp a float value between 0.0f and 1.0f. * * NaNs are turned into 0.0f. * * @param v The value to clamp. * * @return The clamped value. */

Source from the content-addressed store, hash-verified

288 * @return The clamped value.
289 */
290static inline float clamp1f(float v)
291{
292 return astc::clamp(v, 0.0f, 1.0f);
293}
294
295/**
296 * @brief Clamp a float value between 0.0f and 255.0f.

Calls 1

clampFunction · 0.70

Tested by

no test coverage detected