當前位置: 首頁>>代碼示例>>Python>>正文


Python Point.print_array_of_points方法代碼示例

本文整理匯總了Python中Point.Point.print_array_of_points方法的典型用法代碼示例。如果您正苦於以下問題:Python Point.print_array_of_points方法的具體用法?Python Point.print_array_of_points怎麽用?Python Point.print_array_of_points使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Point.Point的用法示例。


在下文中一共展示了Point.print_array_of_points方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: print_line

# 需要導入模塊: from Point import Point [as 別名]
# 或者: from Point.Point import print_array_of_points [as 別名]
 def print_line(self):
     super(BrokenLine, self).print_line()
     print("[broken line:")
     Point.print_array_of_points(self.array)
     print("]")
開發者ID:goranpavlovic,項目名稱:PraksaHtec,代碼行數:7,代碼來源:BrokenLine.py

示例2: print

# 需要導入模塊: from Point import Point [as 別名]
# 或者: from Point.Point import print_array_of_points [as 別名]
print("Distance between points (5, 7) and (4, 7)", Point.distance_coord__(5, 7, 4, 7))
print("Distance between points p3 and p4 is %d " % p3.distance_point(p4))
print("Distance between points p1 and p2 is %d " % Point.distance_point__(p1, p2))

p1.set_x(0)
p1.set_y(0)
p2.set_x(1)
p2.set_y(1)
p3.set_x(2)
p3.set_y(2)
p4.set_x(3)
p4.set_y(3)

points = [p1, p2, p3, p4]

Point.print_array_of_points(points)

print("------------------ CLASS Line TESTING ------------------")

# l1 = Line()

print("------------------ CLASS StraightLine TESTING ------------------")

sl1 = StraightLine()
sl2 = StraightLine(p1, p2)
sl3 = StraightLine(Point(0, 0), p3)

print("Straight line sl1 length is %d" % sl1.line_length())
print("Straight line sl2 length is %d" % sl2.line_length())

sl1.print_straight_line()
開發者ID:goranpavlovic,項目名稱:PraksaHtec,代碼行數:33,代碼來源:LineTest.py

示例3: print_polygon

# 需要導入模塊: from Point import Point [as 別名]
# 或者: from Point.Point import print_array_of_points [as 別名]
 def print_polygon(self):
     print("Polygon %d :" % super(Polygon, self).get_id())
     Point.print_array_of_points(self.array)
開發者ID:goranpavlovic,項目名稱:PraksaHtec,代碼行數:5,代碼來源:Polygon.py


注:本文中的Point.Point.print_array_of_points方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。