You can divide integers, it's just that the result is another integer (e.g. 3/2=1). Can you please explain what you're doing this for, however, becasue I'm having trouble seeing what you are trying to do. My initial thought is that if all you want to do is keep a value inside a range just use
myVal = myVal MIN lower_bound MAX upper_bound
But I don't know if that's what you need, so I'd appreciate it if you could clarify your question, unless by some struck of luck I just ansered it
Stephen