From 3d84cc7997bf7926fe3854b919430444d2d53f39 Mon Sep 17 00:00:00 2001 From: ShisatoYano Date: Thu, 22 Aug 2024 15:22:09 +0000 Subject: [PATCH] renamed function --- src/components/course/cubic_spline_course/cubic_spline_2d.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/course/cubic_spline_course/cubic_spline_2d.py b/src/components/course/cubic_spline_course/cubic_spline_2d.py index dc8e601..a85ade4 100644 --- a/src/components/course/cubic_spline_course/cubic_spline_2d.py +++ b/src/components/course/cubic_spline_course/cubic_spline_2d.py @@ -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)