本文整理汇总了Python中line.Line.line_relationship方法的典型用法代码示例。如果您正苦于以下问题:Python Line.line_relationship方法的具体用法?Python Line.line_relationship怎么用?Python Line.line_relationship使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类line.Line
的用法示例。
在下文中一共展示了Line.line_relationship方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_line_functions
# 需要导入模块: from line import Line [as 别名]
# 或者: from line.Line import line_relationship [as 别名]
def test_line_functions():
"""Quiz 7 line functions"""
line1 = Line(Vector([4.046, 2.836]), 1.21)
line2 = Line(Vector([10.115, 7.09]), 3.025)
assert line1.line_relationship(line2) == 'lines are coincidental'
line3 = Line(Vector([7.204, 3.182]), 8.68)
line4 = Line(Vector([8.172, 4.114]), 9.883)
assert line3.line_relationship(line4) == ("lines intersect at "
"(Decimal('1.173'), "
"Decimal('0.073'))")
line5 = Line(Vector([1.182, 5.562]), 6.744)
line6 = Line(Vector([1.773, 8.343]), 9.525)
assert line5.line_relationship(line6) == 'lines intersect at (None, None)'