Skip to content

Commit

Permalink
F** added point setter
Browse files Browse the repository at this point in the history
  • Loading branch information
tvomacka committed May 29, 2024
1 parent 81f4555 commit d339925
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Geometrica/Primitives/Triangle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ public Point2 this[int key]
$"The provided index {key} was out of bounds, please use index values 0, 1, 2 for triangle point access.")
};
}
set
{
if (key == 0)
_a = value;
else if (key == 1)
_b = value;
else if (key == 2)
_c = value;
}
}

public int Count => 3;
Expand Down

0 comments on commit d339925

Please sign in to comment.