Skip to content

Commit d629813

Browse files
authored
Apply suggestion from @cclauss
1 parent c246a8e commit d629813

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

graphics/bezier_curve.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ def derivative(self, t: float) -> tuple[float, float]:
7878
t: parameter between 0 and 1
7979
Returns the (dx, dy) vector representing the direction of the curve at t.
8080
"""
81-
assert 0 <= t <= 1, "Time t must be between 0 and 1."
81+
if not 0 <= t <= 1:
82+
raise ValueError("Time t must be between 0 and 1.")
8283

8384
n = self.degree
8485
dx = 0.0

0 commit comments

Comments
 (0)