Advertisement
Guest User

Untitled

a guest
May 23rd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.38 KB | None | 0 0
  1.             //Find innerPoint
  2.             Point innerPoint;
  3.             Point first = clipPolygon[0];
  4.             Point second = clipPolygon[1];
  5.             Point third = clipPolygon[2];
  6.             if (clipPolygon.Length == 3)
  7.             {
  8.                 innerPoint = new Point((first.x + second.x + third.x) / 3, (first.y + second.y + third.y) / 3);
  9.             }
  10.             else
  11.             {
  12.                 innerPoint = new Point((first.x + third.x) / 2, (first.y + third.y) / 2);
  13.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement