Skip to content

Commit bda50e9

Browse files
committed
Added Triangle.getLineA, B and C because we're using those so often in various methods it just makes sense.
1 parent 08d0398 commit bda50e9

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

v3/src/geom/triangle/Triangle.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,21 @@ Triangle.prototype = {
3939
this.y3 = y3;
4040

4141
return this;
42+
},
43+
44+
getLineA: function ()
45+
{
46+
return { x1: this.x1, y1: this.y1, x2: this.x2, y2: this.y2 };
47+
},
48+
49+
getLineB: function ()
50+
{
51+
return { x1: this.x2, y1: this.y2, x2: this.x3, y2: this.y3 };
52+
},
53+
54+
getLineC: function ()
55+
{
56+
return { x1: this.x3, y1: this.y3, x2: this.x1, y2: this.y1 };
4257
}
4358

4459
};

0 commit comments

Comments
 (0)