X:

-----

temp_y = (rect_3d.vert[i].y*cos(x_ang)) + (rect_3d.vert[i].z*sin(x_ang));

temp_z = (rect_3d.vert[i].y *-sin(x_ang)) + (rect_3d.vert[i].z*cos(x_ang));

rect_3d.vert[i].y = temp_y;

rect_3d.vert[i].z = temp_z;

Y:

-----

temp_x = (rect_3d.vert[i].x*cos(y_ang)) + (rect_3d.vert[i].z*-sin(y_ang));

temp_z = (rect_3d.vert[i].x *sin(y_ang)) + (rect_3d.vert[i].z*cos(z_ang));

rect_3d.vert[i].x = temp_x;

rect_3d.vert[i].z = temp_z;

Z:

-----

temp_x = (rect_3d.vert[i].x*cos(z_ang)) + (rect_3d.vert[i].y*sin(z_ang));

temp_y = (rect_3d.vert[i].x*-sin(z_ang)) + (rect_3d.vert[i].y*cos(z_ang));

rect_3d.vert[i].x = temp_x;

rect_3d.vert[i].y = temp_y;

--------

Any help would be appreciated, and yes i know i should use matrices.