#include "ADTPoint.h"
point createPoint(int ax,int ay){
point tp;
tp.x = ax;
tp.y = ay;
return tp;
}
point transPoint(int ax, int ay, int deltax, int deltay){
point tp;
ax = ax + deltax;
ay = ay + deltay;
tp.x = ax;
tp.y = ay;
return tp;
}
point mirrorPointSbx(int mx, int my){
point tp;
mx = mx;
my = my * -1;
tp.x = mx;
tp.y = my;
return tp;
}
point mirrorPointSby(int nx, int ny){
point tp;
nx = nx * -1;
ny = ny;
tp.x = nx;
tp.y = ny;
return tp;
}
void printPoint(point P){
printf("Nilai x : %d, nilai y : %d \n" , P.x, P.y);
}

Tidak ada komentar:
Posting Komentar