• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python shape_checker.get_quadrilateral_type函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中source.shape_checker.get_quadrilateral_type函数的典型用法代码示例。如果您正苦于以下问题:Python get_quadrilateral_type函数的具体用法?Python get_quadrilateral_type怎么用?Python get_quadrilateral_type使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_quadrilateral_type函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: test_get_quad

    def test_get_quad(self):
        ret = get_quadrilateral_type('h', 5, 5, 4)
        self.assertEqual(ret, "invalid")

        ret2 = get_quadrilateral_type(5, 5, 5, 4, 90, 90, 90, 'f')
        self.assertEqual(ret2, "invalid")

        ret2 = get_quadrilateral_type(1, 5, 5, 9, 90, 90, 90, 90)
        self.assertEqual(ret2, "disconnected")
开发者ID:AaronMWallace,项目名称:CST-236-2016,代码行数:9,代码来源:shape_checker_test.py


示例2: test_get_quad_parrallelogram

 def test_get_quad_parrallelogram(self):
     """
     Check for invalid return. Non rhombus parrallelogram.
     :return:
     """
     result = get_quadrilateral_type(4, 5, 4, 5, 110, 70, 110, 70)
     self.assertEqual(result, 'invalid')
开发者ID:patrickcarlson,项目名称:CST-236,代码行数:7,代码来源:shape_checker_test.py


示例3: test_get_quad_angover_all_float

 def test_get_quad_angover_all_float(self):
     """
     Check for invalid return. Angles over 360 degrees total. float
     :return:
     """
     result = get_quadrilateral_type(2, 2, 2, 2, 180.1, .1, 180.1, .1)
     self.assertEqual(result, 'invalid')
开发者ID:patrickcarlson,项目名称:CST-236,代码行数:7,代码来源:shape_checker_test.py


示例4: test_get_quad_angl180_all_float

 def test_get_quad_angl180_all_float(self):
     """
     Check for invalid, opposite angles 180 degrees.
     :return:
     """
     result = get_quadrilateral_type(2, 2, 2, 2, 180.0, 0, 180.0, 0)
     self.assertEqual(result, 'invalid')
开发者ID:patrickcarlson,项目名称:CST-236,代码行数:7,代码来源:shape_checker_test.py


示例5: test_get_quad_under_all_float

 def test_get_quad_under_all_float(self):
     """
     Check for rhombus return. float angles.
     :return:
     """
     result = get_quadrilateral_type(2, 2, 2, 2, 179.9, .1, 179.9, .1)
     self.assertEqual(result, 'rhombus')
开发者ID:patrickcarlson,项目名称:CST-236,代码行数:7,代码来源:shape_checker_test.py


示例6: test_get_quad_rhombus_all_float

 def test_get_quad_rhombus_all_float(self):
     """
     Test quadrilateral rhombus all float input
     :return: assertion: rhombus
     """
     result = get_quadrilateral_type(1.1, 1.1, 1.1, 1.1, 139.5, 40.5, 40.5, 139.5)
     self.assertEqual(result, 'rhombus')
开发者ID:Derek132435,项目名称:CST-236-Lab-7,代码行数:7,代码来源:shape_checker_test.py


示例7: test_get_quad_square_char

 def test_get_quad_square_char(self):
     """
     Test quadrilateral invalid char input
     :return: assertion: invalid
     """
     result = get_quadrilateral_type('a', 1, 1, 1, 'b', 90, 90, 90)
     self.assertEqual(result, 'invalid')
开发者ID:Derek132435,项目名称:CST-236-Lab-7,代码行数:7,代码来源:shape_checker_test.py


示例8: test_get_quad_disconnected

 def test_get_quad_disconnected(self):
     """
     Test quadrilateral disconnected all int input
     :return: assertion: disconnected
     """
     result = get_quadrilateral_type(1, 1, 1, 1, 41, 40, 140, 140)
     self.assertEqual(result, 'disconnected')
开发者ID:Derek132435,项目名称:CST-236-Lab-7,代码行数:7,代码来源:shape_checker_test.py


示例9: test_get_quad_rect_all_int

 def test_get_quad_rect_all_int(self):
     """
     check for rectangle return. int sides.
     :return:
     """
     result = get_quadrilateral_type(2, 4, 2, 4, 90, 90, 90, 90)
     self.assertEqual(result, 'rectangle')
开发者ID:patrickcarlson,项目名称:CST-236,代码行数:7,代码来源:shape_checker_test.py


示例10: test_get_quad_square_all_float

 def test_get_quad_square_all_float(self):
     """
     Check returns square with floats sides.
     :return:
     """
     result = get_quadrilateral_type(2.4, 2.4, 2.4, 2.4, 90, 90, 90, 90)
     self.assertEqual(result, 'square')
开发者ID:patrickcarlson,项目名称:CST-236,代码行数:7,代码来源:shape_checker_test.py


示例11: test_get_quad_gtr180_all_int

 def test_get_quad_gtr180_all_int(self):
     """
     Check for invalid return. Angle greater than 180 degrees.
     :return:
     """
     result = get_quadrilateral_type(2, 2, 2, 2, 190, 90, 90, 90)
     self.assertEqual(result, 'invalid')
开发者ID:patrickcarlson,项目名称:CST-236,代码行数:7,代码来源:shape_checker_test.py


示例12: test_get_quad_angleltz_all_int

 def test_get_quad_angleltz_all_int(self):
     """
     Check for invalid return. Angles less than zero.
     :return:
     """
     result = get_quadrilateral_type(2, 2, 2, 2, -5, -5, -5, -5)
     self.assertEqual(result, 'invalid')
开发者ID:patrickcarlson,项目名称:CST-236,代码行数:7,代码来源:shape_checker_test.py


示例13: test_get_quad_sideltz_all_int

 def test_get_quad_sideltz_all_int(self):
     """
     Check for invalid return. Sides less than zero.
     :return:
     """
     result = get_quadrilateral_type(-1, -1, -1, -1, 90, 90, 90, 90)
     self.assertEqual(result, 'invalid')
开发者ID:patrickcarlson,项目名称:CST-236,代码行数:7,代码来源:shape_checker_test.py


示例14: test_get_quad_angle_char

 def test_get_quad_angle_char(self):
     """
     check for invalid return. Char inputs for angles.
     :return:
     """
     result = get_quadrilateral_type(14, 5, 14, 5, 'w', 'x', 'y', 'z')
     self.assertEqual(result, 'invalid')
开发者ID:patrickcarlson,项目名称:CST-236,代码行数:7,代码来源:shape_checker_test.py


示例15: test_get_quad_side_char

 def test_get_quad_side_char(self):
     """
     check for invalid return. Char inputs for sides.
     :return:
     """
     result = get_quadrilateral_type('a', 'b', 'c', 'd', 90, 90, 90, 90)
     self.assertEqual(result, 'invalid')
开发者ID:patrickcarlson,项目名称:CST-236,代码行数:7,代码来源:shape_checker_test.py


示例16: test_get_quad_rhombus_all_int

 def test_get_quad_rhombus_all_int(self):
     """
     Test quadrilateral rhombus all int input
     :return: assertion: rhombus
     """
     result = get_quadrilateral_type(1, 1, 1, 1, 40, 40, 140, 140)
     self.assertEqual(result, 'rhombus')
开发者ID:Derek132435,项目名称:CST-236-Lab-7,代码行数:7,代码来源:shape_checker_test.py


示例17: test_get_quad_rhombus_all_int

 def test_get_quad_rhombus_all_int(self):
     """
     Check for rhombus return, int sides.
     :return:
     """
     result = get_quadrilateral_type(3, 3, 3, 3, 44, 136, 44, 136)
     self.assertEqual(result, 'rhombus')
开发者ID:patrickcarlson,项目名称:CST-236,代码行数:7,代码来源:shape_checker_test.py


示例18: test_get_quad_neg

 def test_get_quad_neg(self):
     """
     Test quadrilateral negative int input
     :return: assertion: invalid
     """
     result = get_quadrilateral_type(-1, 1, 1, 1, -90, 90, 90, 90)
     self.assertEqual(result, 'invalid')
开发者ID:Derek132435,项目名称:CST-236-Lab-7,代码行数:7,代码来源:shape_checker_test.py


示例19: test_get_quad_sidedisc_all_int

 def test_get_quad_sidedisc_all_int(self):
     """
     Check for disconnected return, sides.
     :return:
     """
     result = get_quadrilateral_type(2, 2, 2, 4, 50, 130, 50, 130)
     self.assertEqual(result, 'disconnected')
开发者ID:patrickcarlson,项目名称:CST-236,代码行数:7,代码来源:shape_checker_test.py


示例20: test_get_quad_square_all_float

 def test_get_quad_square_all_float(self):
     """
     Test quadrilateral square all float input
     :return: assertion: square
     """
     result = get_quadrilateral_type(1.1, 1.1, 1.1, 1.1, 90, 90, 90, 90)
     self.assertEqual(result, 'square')
开发者ID:Derek132435,项目名称:CST-236-Lab-7,代码行数:7,代码来源:shape_checker_test.py



注:本文中的source.shape_checker.get_quadrilateral_type函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python shape_checker.get_triangle_type函数代码示例发布时间:2022-05-27
下一篇:
Python shape_checker.get_quad_type函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap