Nice small lib; couple changes

Math.floor is losing precision; switched to Math.round. Also reformatted; feel free to ignore my sense of clear clode. :)