Fix interpolation
This commit is contained in:
parent
8bc329293b
commit
e6c0b3d2d9
1 changed files with 0 additions and 2 deletions
|
|
@ -9,8 +9,6 @@ INTERPOLATION_TYPE = Literal["cubic", "linear"]
|
||||||
def interpolate(
|
def interpolate(
|
||||||
control_points: List[float], t: float, type: INTERPOLATION_TYPE
|
control_points: List[float], t: float, type: INTERPOLATION_TYPE
|
||||||
) -> float:
|
) -> float:
|
||||||
control_points = sorted(control_points)
|
|
||||||
|
|
||||||
if type == "cubic":
|
if type == "cubic":
|
||||||
x = np.linspace(0, 1, len(control_points))
|
x = np.linspace(0, 1, len(control_points))
|
||||||
cs = CubicSpline(x, control_points)
|
cs = CubicSpline(x, control_points)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue