The answers so far probably don't satisfy the "without touching the maxx" requirement; it may depend on your definition of "touching". You might get away with it by subtracting a tiny fraction of delta from maxx before using the division approach... :)
Luc Pattyn [My Articles] Nil Volentibus Arduum