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

Function clamp255f

Source/astcenc_mathlib.h:304–307  ·  view source on GitHub ↗

* @brief Clamp a float value between 0.0f and 255.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

302 * @return The clamped value.
303 */
304static inline float clamp255f(float v)
305{
306 return astc::clamp(v, 0.0f, 255.0f);
307}
308
309/**
310 * @brief SP float round-down.

Callers 2

quantize_rgbsFunction · 0.85

Calls 1

clampFunction · 0.70

Tested by

no test coverage detected