| 26 | } |
| 27 | |
| 28 | void TestPointDDir(PointD const & dst, PointD const & src) |
| 29 | { |
| 30 | double const len1 = dst.Length(); |
| 31 | double const len2 = src.Length(); |
| 32 | if (len1 < kAlmostZero || len2 < kAlmostZero) |
| 33 | { |
| 34 | TestEqual(dst.x, src.x); |
| 35 | TestEqual(dst.y, src.y); |
| 36 | } |
| 37 | else |
| 38 | { |
| 39 | TestEqual(dst.x / len1, src.x / len2); |
| 40 | TestEqual(dst.y / len1, src.y / len2); |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | } // namespace |
| 45 |