Improved Algorithm

Less lines of code to get the hexadecimal value of a float