Hi guys, I know I am stupid and I can't figure out is this java code can be translate into Sail Expression?

int count = 0, i = 0;

do
{
  int next = (i + 1) % n;
  if (doIntersect(polygon[i], polygon[next], p, extreme))
     {
  if (orientation(polygon[i], p, polygon[next]) == 0)
  return onSegment(polygon[i], p, polygon[next]);

  count++;
     }
  i = next;
} while (i != 0);

return (count & 1) == 1 ? true : false;

-------------------------------------------------------------------------------

The function doIntersect and function orientation is the function will return you boolean value, and polygon[] is a list that stored point object.

I try to translate this code into Sail Expression but I really don't know how to write do while logic in Appian, and I can't use plug-in java function. 

I know I already ask some similiar function about java code transalte into Sail Expression...Can anyone please help me?

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data