()
| 484 | |
| 485 | |
| 486 | def test_spline(): |
| 487 | |
| 488 | s1 = spline((0, 0), (0, 1)) |
| 489 | s2 = spline([(0, 0), (0, 1)]) |
| 490 | s3 = spline([(0, 0), (0, 1)], [(1, 0), (-1, 0)]) |
| 491 | |
| 492 | assert s1.Length() == approx(1) |
| 493 | assert s2.Length() == approx(1) |
| 494 | assert s3.Length() > 0 |
| 495 | assert s3.tangentAt(0).toTuple() == approx((1, 0, 0)) |
| 496 | assert s3.tangentAt(1).toTuple() == approx((-1, 0, 0)) |
| 497 | |
| 498 | |
| 499 | def test_spline_params(): |