Lines Matching refs:PointF
17 int TestPointF(const PointF& p) { in TestPointF()
29 PointF b(10, 20); in TEST()
43 EXPECT_FALSE(PointF(0.1f, 0).IsOrigin()); in TEST()
44 EXPECT_FALSE(PointF(0, 0.1f).IsOrigin()); in TEST()
45 EXPECT_FALSE(PointF(0.1f, 2).IsOrigin()); in TEST()
46 EXPECT_FALSE(PointF(-0.1f, 0).IsOrigin()); in TEST()
47 EXPECT_FALSE(PointF(0, -0.1f).IsOrigin()); in TEST()
48 EXPECT_FALSE(PointF(-0.1f, -2).IsOrigin()); in TEST()
49 EXPECT_TRUE(PointF(0, 0).IsOrigin()); in TEST()
81 EXPECT_EQ(Point(0, 0), ToRoundedPoint(PointF(0, 0))); in TEST()
82 EXPECT_EQ(Point(0, 0), ToRoundedPoint(PointF(0.0001f, 0.0001f))); in TEST()
83 EXPECT_EQ(Point(0, 0), ToRoundedPoint(PointF(0.4999f, 0.4999f))); in TEST()
84 EXPECT_EQ(Point(1, 1), ToRoundedPoint(PointF(0.5f, 0.5f))); in TEST()
85 EXPECT_EQ(Point(1, 1), ToRoundedPoint(PointF(0.9999f, 0.9999f))); in TEST()
87 EXPECT_EQ(Point(10, 10), ToRoundedPoint(PointF(10, 10))); in TEST()
88 EXPECT_EQ(Point(10, 10), ToRoundedPoint(PointF(10.0001f, 10.0001f))); in TEST()
89 EXPECT_EQ(Point(10, 10), ToRoundedPoint(PointF(10.4999f, 10.4999f))); in TEST()
90 EXPECT_EQ(Point(11, 11), ToRoundedPoint(PointF(10.5f, 10.5f))); in TEST()
91 EXPECT_EQ(Point(11, 11), ToRoundedPoint(PointF(10.9999f, 10.9999f))); in TEST()
93 EXPECT_EQ(Point(-10, -10), ToRoundedPoint(PointF(-10, -10))); in TEST()
94 EXPECT_EQ(Point(-10, -10), ToRoundedPoint(PointF(-10.0001f, -10.0001f))); in TEST()
95 EXPECT_EQ(Point(-10, -10), ToRoundedPoint(PointF(-10.4999f, -10.4999f))); in TEST()
96 EXPECT_EQ(Point(-11, -11), ToRoundedPoint(PointF(-10.5f, -10.5f))); in TEST()
97 EXPECT_EQ(Point(-11, -11), ToRoundedPoint(PointF(-10.9999f, -10.9999f))); in TEST()
101 EXPECT_EQ(PointF().ToString(), ScalePoint(Point(), 2).ToString()); in TEST()
102 EXPECT_EQ(PointF().ToString(), ScalePoint(Point(), 2, 2).ToString()); in TEST()
104 EXPECT_EQ(PointF(2, -2).ToString(), in TEST()
106 EXPECT_EQ(PointF(2, -2).ToString(), in TEST()
109 PointF zero; in TEST()
110 PointF one(1, -1); in TEST()
118 EXPECT_EQ(PointF().ToString(), zero.ToString()); in TEST()
119 EXPECT_EQ(PointF(6, -3).ToString(), one.ToString()); in TEST()
149 PointF a; in TEST()
151 a = PointF(3.5f, 5.5f); in TEST()
152 EXPECT_EQ(PointF(3.5f, 5.5f).ToString(), a.ToString()); in TEST()
153 a.SetToMax(PointF(2.5f, 4.5f)); in TEST()
154 EXPECT_EQ(PointF(3.5f, 5.5f).ToString(), a.ToString()); in TEST()
155 a.SetToMax(PointF(3.5f, 5.5f)); in TEST()
156 EXPECT_EQ(PointF(3.5f, 5.5f).ToString(), a.ToString()); in TEST()
157 a.SetToMax(PointF(4.5f, 2.5f)); in TEST()
158 EXPECT_EQ(PointF(4.5f, 5.5f).ToString(), a.ToString()); in TEST()
159 a.SetToMax(PointF(8.5f, 10.5f)); in TEST()
160 EXPECT_EQ(PointF(8.5f, 10.5f).ToString(), a.ToString()); in TEST()
162 a.SetToMin(PointF(9.5f, 11.5f)); in TEST()
163 EXPECT_EQ(PointF(8.5f, 10.5f).ToString(), a.ToString()); in TEST()
164 a.SetToMin(PointF(8.5f, 10.5f)); in TEST()
165 EXPECT_EQ(PointF(8.5f, 10.5f).ToString(), a.ToString()); in TEST()
166 a.SetToMin(PointF(11.5f, 9.5f)); in TEST()
167 EXPECT_EQ(PointF(8.5f, 9.5f).ToString(), a.ToString()); in TEST()
168 a.SetToMin(PointF(7.5f, 11.5f)); in TEST()
169 EXPECT_EQ(PointF(7.5f, 9.5f).ToString(), a.ToString()); in TEST()
170 a.SetToMin(PointF(3.5f, 5.5f)); in TEST()
171 EXPECT_EQ(PointF(3.5f, 5.5f).ToString(), a.ToString()); in TEST()