When I set the m_x and m_y equal to x1 and y1 in the else, it just skips over it. I have to put it at the end or the coordinate pairs come out -8700302093. Why doesn't the else get called?Code:if(x1==x2) { if(x1==x3||x1==x4) { setDef(); return false; } } else if(x1==x3 && x1==x4) { setDef(); return false; } else if(x2==x3 && x2==x4) { setDef(); return false; } else if(y1==y2) { if(y1==y3||y1==y4) { setDef(); return false; } } else if(y1==y3 && y1==y4) { setDef(); return false; } else if(y2==y3 && y2==y4) { setDef(); return false; } else { m_x[0] = x1; m_y[0] = y1; m_x[1] = x2; m_y[1] = y2; m_x[2] = x3; m_y[2] = y3; m_x[3] = x4; m_y[3] = y4; return true; } /*...It only works if I put this right here...*/ m_x[0] = x1; m_y[0] = y1; m_x[1] = x2; m_y[1] = y2; m_x[2] = x3; m_y[2] = y3; m_x[3] = x4; m_y[3] = y4; return true;




Reply With Quote