コード例 #1
0
ファイル: TestCarrotland.py プロジェクト: grovesr/foo_bar
 def test_containing_pt_ct_negative_nonunity_slope(self):
     s1 = IntegerSegment(IntegerPoint(0, 0), IntegerPoint(4, -6))
     res = s1.containing_pt_ct()
     self.assertEqual(res, 3)
コード例 #2
0
ファイル: TestCarrotland.py プロジェクト: grovesr/foo_bar
 def test_containing_pt_ct_vertical(self):
     s1 = IntegerSegment(IntegerPoint(0, 0), IntegerPoint(0, 2))
     res = s1.containing_pt_ct()
     self.assertEqual(res, 3)
コード例 #3
0
ファイル: TestCarrotland.py プロジェクト: grovesr/foo_bar
 def test_containing_pt_ct_positive_unity_slope(self):
     s1 = IntegerSegment(IntegerPoint(0, 0), IntegerPoint(2, 2))
     res = s1.containing_pt_ct()
     self.assertEqual(res, 3)
コード例 #4
0
ファイル: TestCarrotland.py プロジェクト: grovesr/foo_bar
 def test_containing_pt_ct_zero_length(self):
     s1 = IntegerSegment(IntegerPoint(0, 0), IntegerPoint(0, 0))
     res = s1.containing_pt_ct()
     self.assertEqual(res, 1)