def getFactor(aa, bb, innerValue):
    return (innerValue-aa)/(bb-aa)

if __name__ == '__main__':
    factor = getFactor(10, 20, 15)
    # 0.5
