| 9 | #include "dotproperties.h" |
| 10 | |
| 11 | int main() { |
| 12 | point2d a(1, 2); |
| 13 | point2d b(3, 4); |
| 14 | a += b; |
| 15 | assert(a.x == 4 && a.y == 6); |
| 16 | a -= b; |
| 17 | assert(a.x == 1 && a.y == 2); |
| 18 | a *= 2; |
| 19 | assert(a.x == 2 && a.y == 4); |
| 20 | assert(dot(a, b) == 22); |
| 21 | |
| 22 | point3d A(1, 2, 3); |
| 23 | point3d B(4, 5, 6); |
| 24 | assert(dot(A, B) == 32); |
| 25 | |
| 26 | point2d pyt(3, 4); |
| 27 | assert(norm(pyt) == 25); |
| 28 | assert(abs(pyt) == 5); |
| 29 | } |
nothing calls this directly
no outgoing calls
no test coverage detected