Added a helper method

Added a helper method to map a CGFloat value from a source range to a destination range