Skip to content

Commit

Permalink
renamed function
Browse files Browse the repository at this point in the history
  • Loading branch information
ShisatoYano committed Aug 22, 2024
1 parent ae0c8f6 commit 3d84cc7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/course/cubic_spline_course/cubic_spline_2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ class CubicSpline2D:
"""

def __init__(self, x_points, y_points):
self.s = self._calculate_distance_from_start(x_points, y_points)
self.s = self._calc_base_points(x_points, y_points)
self.sx = CubicSpline(self.s, x_points)
self.sy = CubicSpline(self.s, y_points)

def _calculate_distance_from_start(self, x_points, y_points):
def _calc_base_points(self, x_points, y_points):
dx = np.diff(x_points)
dy = np.diff(y_points)
self.ds = np.hypot(dx, dy)
Expand Down

0 comments on commit 3d84cc7

Please sign in to comment.