Clamp ν¨μ(lower/upper bound)
Min, Maxκ°μ μ ν΄μ ν΄λΉ valueκ° κ° μμ λ€μ΄μ€λλ‘ νμ
#define CLAMP(value, low, high) ((value) < (low) ? (low) : ((value) > (high) ? (high) : (value)))
Min, Maxκ°μ μ ν΄μ ν΄λΉ valueκ° κ° μμ λ€μ΄μ€λλ‘ νμ
#define CLAMP(value, low, high) ((value) < (low) ? (low) : ((value) > (high) ? (high) : (value)))
Leave a comment