Commit 55c4830d by rakein

Delete check3Nurk.h

parent 0ea2c802
Showing with 0 additions and 30 deletions
#include <math.h>
int check3Nurk(seeStruct A[], seeStruct B[], seeStruct C[], int i)
{
double ab, bc, ac;
ab = sqrt(pow((B[i].x - A[i].x), 2) + pow((B[i].y - A[i].y), 2));
bc = sqrt(pow((C[i].x - B[i].x), 2) + pow((C[i].y - B[i].y), 2));
ac = sqrt(pow((C[i].x - A[i].x), 2) + pow((C[i].y - A[i].y), 2));
if(ab >= bc && ab >= ac)
{
if(ab < bc + ac)
{
return 0;
}
} else if (bc >= ab && bc >= ac)
{
if(bc < ab + ac)
{
return 0;
}
} else if (ac >= ab && ac >= bc)
{
if(ac < ab + bc)
{
return 0;
}
}
return 1;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment