checking whether 4 points in a plane define a square ??

Posted by osabri on Stack Overflow See other posts from Stack Overflow or by osabri
Published on 2010-04-24T10:07:12Z Indexed on 2010/04/24 10:13 UTC
Read the original article Hit count: 245

Filed under:
|

how to check whether 4 points in the plane define a square? what's the function which given a point and a value of the area of a square as input parameters returns four squares(define a corresponding type) with sides parallel to the x axis and y axis

this how i start:

#include <stdio.h>
#include<math.h>
struct point{
float x;
float y;
}
typedef struct point POINT;
struct square{
struct point p1;
struct point p2;
struct point p3;
struct point p4;
}
typedef struct square SQUARE;

int main()
{
int point;
printf("point coordinate");
printf("\n\n");

printf("enter data\n");

© Stack Overflow or respective owner

Related posts about c

    Related posts about programming-languages