Lines Matching refs:ManhattanDistanceToPoint
872 TEST(RectTest, ManhattanDistanceToPoint) { in TEST() argument
874 EXPECT_EQ(0, i.ManhattanDistanceToPoint(Point(1, 2))); in TEST()
875 EXPECT_EQ(0, i.ManhattanDistanceToPoint(Point(4, 6))); in TEST()
876 EXPECT_EQ(0, i.ManhattanDistanceToPoint(Point(2, 4))); in TEST()
877 EXPECT_EQ(3, i.ManhattanDistanceToPoint(Point(0, 0))); in TEST()
878 EXPECT_EQ(2, i.ManhattanDistanceToPoint(Point(2, 0))); in TEST()
879 EXPECT_EQ(3, i.ManhattanDistanceToPoint(Point(5, 0))); in TEST()
880 EXPECT_EQ(1, i.ManhattanDistanceToPoint(Point(5, 4))); in TEST()
881 EXPECT_EQ(3, i.ManhattanDistanceToPoint(Point(5, 8))); in TEST()
882 EXPECT_EQ(2, i.ManhattanDistanceToPoint(Point(3, 8))); in TEST()
883 EXPECT_EQ(2, i.ManhattanDistanceToPoint(Point(0, 7))); in TEST()
884 EXPECT_EQ(1, i.ManhattanDistanceToPoint(Point(0, 3))); in TEST()
887 EXPECT_FLOAT_EQ(0.f, f.ManhattanDistanceToPoint(PointF(1.1f, 2.1f))); in TEST()
888 EXPECT_FLOAT_EQ(0.f, f.ManhattanDistanceToPoint(PointF(4.2f, 6.f))); in TEST()
889 EXPECT_FLOAT_EQ(0.f, f.ManhattanDistanceToPoint(PointF(2.f, 4.f))); in TEST()
890 EXPECT_FLOAT_EQ(3.2f, f.ManhattanDistanceToPoint(PointF(0.f, 0.f))); in TEST()
891 EXPECT_FLOAT_EQ(2.1f, f.ManhattanDistanceToPoint(PointF(2.f, 0.f))); in TEST()
892 EXPECT_FLOAT_EQ(2.9f, f.ManhattanDistanceToPoint(PointF(5.f, 0.f))); in TEST()
893 EXPECT_FLOAT_EQ(.8f, f.ManhattanDistanceToPoint(PointF(5.f, 4.f))); in TEST()
894 EXPECT_FLOAT_EQ(2.6f, f.ManhattanDistanceToPoint(PointF(5.f, 8.f))); in TEST()
895 EXPECT_FLOAT_EQ(1.8f, f.ManhattanDistanceToPoint(PointF(3.f, 8.f))); in TEST()
896 EXPECT_FLOAT_EQ(1.9f, f.ManhattanDistanceToPoint(PointF(0.f, 7.f))); in TEST()
897 EXPECT_FLOAT_EQ(1.1f, f.ManhattanDistanceToPoint(PointF(0.f, 3.f))); in TEST()