Add eulerline property to Triangle #9405

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
5 participants

jagannath93 commented May 16, 2015

 No description provided.
``` Add eulerline property to Triangle ```
``` 8f4dbb3 ```

smichr reviewed May 16, 2015

 + + eulerline : Line if triangle is isoceles or right angled + + common center: Point if the triangle is equilateral in which case all the all

Member

all the

smichr May 16, 2015

Member

at the same place

smichr reviewed May 16, 2015

 @@ -2215,6 +2215,37 @@ def medial(self): s = self.sides return Triangle(s[0].midpoint, s[1].midpoint, s[2].midpoint) + @property + def eulerline(self): + """The euler line of the triangle.

Member

euler -> Euler

smichr reviewed May 16, 2015

 + Returns + ======= + + eulerline : Line if triangle is isoceles or right angled

smichr May 16, 2015

Member

isoceles -> isosceles

``` correct eulerline function documentation ```
``` 49ff0a9 ```

jagannath93 commented May 18, 2015

 Hi @smichr , I've done all the corrections that you had mentioned.

debugger22 reviewed May 18, 2015

 @@ -1436,6 +1436,12 @@ def test_polygon(): '''20151573611150265741278060334545897615974257/16073686192120448448157''' '''8148466200000000000)''') + # Eulerline + print(t1.eulerline)

debugger22 May 18, 2015

Member

I think this `print` is not required.

debugger22 reviewed May 18, 2015

 + assert t1.eulerline in (Line(Point(5/3, 5/3), Point(5/2, 5/2)), + Line(Point(0, 0), Point(5/3, 5/3)), + Line(Point(0, 0), Point(5/2, 5/2))) +

debugger22 May 18, 2015

Member

You should also add tests when it returns a `Point`.

Member

gxyd commented Jan 10, 2018

 I think we can close this. `eulerline` method was implemented in PR #10615 . Closing this.