Since Nan is not a real number, I wouldn't expect int casting to work predictably anyway. The easiest way around it is to check if a IsNaN before attempting the Round and int cast operations. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome