Skip to content

Commit

Permalink
fixed 1d position calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
ShisatoYano committed Aug 25, 2024
1 parent 2081e17 commit 0206e35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/course/cubic_spline_course/cubic_spline.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def calculate_position(self, x):
elif x > self.x_points[-1]: return None

i_x = self._search_segment_index(x)
dx = x - i_x
dx = x - self.x_points[i_x]
y = self.a[i_x] + self.b[i_x] * dx + \
self.c[i_x] * dx ** 2.0 + self.d[i_x] * dx ** 3.0

Expand Down

0 comments on commit 0206e35

Please sign in to comment.