SwPoint

From SWWorkshop

Jump to: navigation, search

It holds x,y coordinate. You could define location or coordinate of something

Structure

typedef struct _swPoint{
	float x;
	float y;
}swPoint;


Functions

swPoint*	swPointCreate(float x,float y);
void		swPointDestroy(swPoint *point);
void		swPointSet(swPoint *p,float x,float y);
void		swPointCopy(swPoint *copy,swPoint *real);
swPoint*	swPointClone(swPoint *real);
bool		swPointEquals(swPoint *point1,swPoint *point2);


Static Creation

swPoint point={100,100};
swPoint point;
swPointSet(&point,100,100


Dynamic Creation and Destroy

swPoint *point=swPointCreate{100,100};
swPointDestroy(point)
Personal tools