# Clamp (Real)

Grammar — Clamp value between min and max
FlagsFunction

Adjust the value to make sure it stays within the provided bounds.

# Arguments

  • fixed — Value
  • fixed — Min
  • fixed — Max

Returns — fixed

fixed libNtve_gf_ArithmeticRealClamp(
	fixed lp_value,
	fixed lp_min,
	fixed lp_max,
);

Category: Math / Arithmetic

# Examples

# mods/heroesmapmods/battlegroundmapmods/volskayamechanics.stormmod

LibVLSK.galaxy

// L311
libNtve_gf_ArithmeticRealClamp(lv_newProgress, 0.0, libVLSK_gv_capturePointContestTimeGoal_C)
// L390
libNtve_gf_ArithmeticRealClamp(lv_newProgressValue, 0.0, libVLSK_gv_capturePointContestTimeGoal_C)
// L438
libNtve_gf_ArithmeticRealClamp(libVLSK_gv_capturePoints[lp_capturePointIndex].lv_victoryTimes[lv_team], 0.0, (libVLSK_gv_capturePointVictoryTimeGoal_C * 0.999))

# mods/heromods/hanzo.stormmod

LibHHAN.galaxy

// L230
libNtve_gf_ArithmeticRealClamp(lv_currentSearchStartDistance, lv_searchStartDistance, lv_searchEndDistance)
// L231
libNtve_gf_ArithmeticRealClamp(lv_currentSearchEndDistance, lv_searchStartDistance, lv_searchEndDistance)