test for * operator
(self)
| 79 | assert (x - y).component(2) == 2 |
| 80 | |
| 81 | def test_mul(self) -> None: |
| 82 | """ |
| 83 | test for * operator |
| 84 | """ |
| 85 | x = Vector([1, 2, 3]) |
| 86 | a = Vector([2, -1, 4]) # for test of dot product |
| 87 | b = Vector([1, -2, -1]) |
| 88 | assert str(x * 3.0) == "(3.0,6.0,9.0)" |
| 89 | assert a * b == 0 |
| 90 | |
| 91 | def test_zero_vector(self) -> None: |
| 92 | """ |