def map_to_range(min_1:float, max_1:float, min_2:float, max_2:float, value:float):
	"""
		This function maps a number of one range to that of another range.

		Arguments:
			min_1 : float/int : The lowest value of the range you're converting from.
			max_1 : float/int : The highest value of the range you're converting from.
			min_2 : float/int : The lowest value of the range you're converting to.
			max_2 : float/int : The highest value of the range you're converting to.
			value : float/int : The value that will be converted.

		Example:
			mapping a RGB value between 0 - 255 to a RGB value between 0 - 1
			map_to_range(0, 255, 0, 1, 127.5) -> will return 0.5

	"""

	binary_range = (value - min_1) / (max_1 - min_1)
	return binary_range * (max_2 - min_2) + min_2