Solutions in place

This commit is contained in:
Chris Proctor 2023-07-30 17:36:43 -04:00
parent e198c13b95
commit d01f07eea0
1 changed files with 4 additions and 4 deletions

View File

@ -32,12 +32,12 @@ def ratio(value, start, end):
def scale(value, domain_min, domain_max, range_min, range_max):
"Given a value within a domain, returns the scaled equivalent within range."
raise NotImplementedError
return range_min + ratio(value, domain_min, domain_max) * (range_max - range_min)
def get_x_values(points):
"Returns the first value for each point in points."
raise NotImplementedError
return [x for x, y in points]
def get_y_values(points):
"Returns the second value for each point in points."
raise NotImplementedError
return [y for x, y in points]