MCPcopy Index your code
hub / github.com/OmkarPathak/pygorithm / test_project_onto_axis

Method test_project_onto_axis

tests/test_geometry.py:750–760  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

748
749
750 def test_project_onto_axis(self):
751 poly = polygon2.Polygon2.from_regular(4, 1, math.pi / 4)
752
753 _axis = vector2.Vector2(0, 1)
754 self._proj_onto_axis_fuzzer(poly.points, _axis, axisall.AxisAlignedLine(_axis, 0, 1))
755
756 _axis2 = vector2.Vector2(1, 0)
757 self._proj_onto_axis_fuzzer(poly.points, _axis2, axisall.AxisAlignedLine(_axis2, 0, 1))
758
759 _axis3 = vector2.Vector2(0.70710678118, 0.70710678118)
760 self._proj_onto_axis_fuzzer(poly.points, _axis3, axisall.AxisAlignedLine(_axis3, 0, 1.41421356236))
761
762 def _contains_point_fuzzer(self, points, point, expected_edge, expected_contains):
763 for i in range(3):

Callers

nothing calls this directly

Calls 2

from_regularMethod · 0.80

Tested by

no test coverage detected