Using a Math.floor instead of Math.round to avoid an error when the fraction is like .9995 (See DIRAPI-241).