Given following logic
T=1, if x < m1T=2, if x >= m1 && x < m2T=3, if x >= m2 && x < m3T=4, if x >= m3
x is a parameter; m1, m2, m3 are thresholds to determine the conversion from x to T. Is there a way to calculate T without using "if"? Say, "rem" or "mod" or something without logic operation?
Best Answer