cityImage.rescale_ranges#

cityImage.rescale_ranges(n, range1, range2)[source]#

Given a value n and the range which it belongs to, the function rescale the value, between a different range.

Parameters:
  • n (int, float) – A value.

  • range1 (tuple) – A certain range, e.g. (0, 1) or (10.5, 100). The value n should be within this range.

  • range2 (tuple) – A range, e.g. (0, 1) or (10.5, 100), that should used to rescale the value.

Returns:

value – The rescaled value.

Return type:

float