Añadidos endpoints de validación, organización del backend en subcarpetas y archivos y añadido el control de errores http.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
def linear_interpolation(x, nodes):
|
||||
for i in range(len(nodes) - 1):
|
||||
x0, y0 = nodes[i]
|
||||
x1, y1 = nodes[i+1]
|
||||
if x0 <= x <= x1:
|
||||
t = (x - x0) / (x1 - x0)
|
||||
return y0 + t * (y1 - y0)
|
||||
return 0.0
|
||||
Reference in New Issue
Block a user