.. (לתיקייה המכילה) | ||
I try to link a mtm_ex1.o which is provided by the course staff and receive the following error:
| |
A. You probably use a wrong object, for example a Windows object on Linux or vice versa. It is also possible that you use a t2 object on a 32 bit Linux (t2 is 64 bit). You should link with the object file matching your Operating System |
Q. I try to link a mtm_ex1.o which is provided by the course staff and receive the following error:
| |
A. You probably use a wrong object - a Linux 32 bit object on t2 (t2 is 64 bit). You should link with the object file matching your Operating System |
Why does the return type of the function pointToString is "Point"? | |
It was a mistake, it should be "char*". Please re download the PDF file. |
What should segmentIntersects return in case of tangent segments? | |
example1: true. example2: false. example3: true. Please re-download segment_test.c from t2 and make sure you pass it after this new change. |
What should the functions polygonCreate and polygonToString return in case of failure? | |
NULL. |
I see typos and enums not needed at the header files. What should I do with that? | |
Re-download those header files. It should be fixed by now. If it still has a mistake inform Ido about it. |
I don't have some defenitions at the headers that according to the PDF I should have like SegmentResult and PolygonRelation. | |
It was a mistake. You don't need those defenitions, re-download the PDF file. |
Can I assume that the polygon given to me won't intersect itself in any way? | |
Yes you can, but you still have to chack its not a line or point in the function: polygonIsConvex. |
What should polygonGetSegment return in case of polygon with only one point? for example polygon:[(3,-2)] | |
It should return the segment: (3,-2)->(3,-2). |
Do polygons with different number of points can be equal? | |
No. |
What should polygonCreate return in case of negetive number of maxPoints? | |
NULL. |
Which parameters should I check when I need to check for NULL argument? for example, in the function: PolygonResult polygonAddPoint(Polygon polygon, Point point); | |
You should only check that the pointers given aren't NULL, and shouldn't check the local variables. At the example, you should check only "polygon" since it's the only pointer given. |
What should testPolygonDestroy check? | |
It should check that it works for NULL too. That is enough. |
Can I get a clarifying example about when are two polygons considered equal by the function polygonEquals? | |
Yes, the function should return true for these two polygons: a = [(0,2),(2,3),(1,0)] b = [(2,1),(1,3),(3,4)] Why? moving polygon 'a' with the point (1,1) and shifting right (in a cyclic way) the order of point's 'a' will produce polygon 'b'. |
Can I get some clarifying examples to polygonIntersect and polygonContains? | |
Yes, let there be 3 polygons: a = [(-1,1),(0,2),(1,-1)] b = [(-1,0),(-1,1),(1,1),(1,0)] c = [(-2,-2),(-2,2),(2,2),(2,-2)] INTERSECTED: (a,b),(b,a),(a,c),(c,a) NOT INTERSECTED: (b,c),(c,b) CONTAINS: (c,a),(c,b) NOT CONTAINS: (a,b),(a,c),(b,a),(b,c) |
How should I submit the dry part electronicly? | |
You should attach it to the zip file along with the other 5 files you have to submit electronicly. |
Should I submit a printed copy of my wet solution? | |
No. It is not written at the assignment and you shouldn't do it. This is our little help to Mother Nature. |