There was an error while loading. Please reload this page.
1 parent c246a8e commit d629813Copy full SHA for d629813
1 file changed
graphics/bezier_curve.py
@@ -78,7 +78,8 @@ def derivative(self, t: float) -> tuple[float, float]:
78
t: parameter between 0 and 1
79
Returns the (dx, dy) vector representing the direction of the curve at t.
80
"""
81
- assert 0 <= t <= 1, "Time t must be between 0 and 1."
+ if not 0 <= t <= 1:
82
+ raise ValueError("Time t must be between 0 and 1.")
83
84
n = self.degree
85
dx = 0.0
0 commit comments