Implemented floating point map() function