Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
unionized-triangles-2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Brandon Lai-Cheong
unionized-triangles-2
Commits
b8f8e5a2
Commit
b8f8e5a2
authored
5 months ago
by
Brandon Lai-Cheong
Browse files
Options
Downloads
Patches
Plain Diff
changed triangle representation
parent
acd8ee91
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/shapes/triangle.cpp
+1
-1
1 addition, 1 deletion
src/shapes/triangle.cpp
src/shapes/triangle.h
+1
-1
1 addition, 1 deletion
src/shapes/triangle.h
src/shapes/triangle_edges.cpp
+1
-1
1 addition, 1 deletion
src/shapes/triangle_edges.cpp
with
3 additions
and
3 deletions
src/shapes/triangle.cpp
+
1
−
1
View file @
b8f8e5a2
...
...
@@ -4,4 +4,4 @@ bool Triangle::neighbours(Triangle &other) {
return
false
;
}
Triangle
::
Triangle
(
Point
p1
,
Point
p2
,
Point
p3
,
int
depth
)
:
p1
{
p1
},
p2
{
p2
},
p3
{
p3
},
depth
{
depth
}
{}
\ No newline at end of file
Triangle
::
Triangle
(
Point
p1
,
Point
p2
,
Point
p3
,
int
depth
)
:
points
{
p1
,
p2
,
p3
},
depth
{
depth
}
{}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/shapes/triangle.h
+
1
−
1
View file @
b8f8e5a2
...
...
@@ -3,7 +3,7 @@
// points specified clockwise
struct
Triangle
{
Point
p
1
,
p2
,
p3
;
Point
p
oints
[
3
]
;
int
depth
;
bool
neighbours
(
Triangle
&
other
);
Triangle
(
Point
p1
,
Point
p2
,
Point
p3
,
int
depth
);
...
...
This diff is collapsed.
Click to expand it.
src/shapes/triangle_edges.cpp
+
1
−
1
View file @
b8f8e5a2
#include
"triangle_edges.h"
#include
"triangle.h"
TriangleEdges
::
TriangleEdges
(
const
Triangle
&
t
)
:
e1
{
Edge
{
t
.
p
1
,
t
.
p2
}},
e2
{
Edge
{
t
.
p2
,
t
.
p3
}},
e3
{
Edge
{
t
.
p3
,
t
.
p1
}}{
TriangleEdges
::
TriangleEdges
(
const
Triangle
&
t
)
:
e1
{
Edge
{
t
.
p
oints
[
0
],
t
.
points
[
1
]}},
e2
{
Edge
{
t
.
points
[
1
],
t
.
points
[
2
]}},
e3
{
Edge
{
t
.
points
[
2
],
t
.
points
[
0
]
}}{
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment