br />	Point2d p;<br />	setpt2d(&amp;p, x, y);<br />	return p;<br />}<br /><br />Point2d<br />mid2d(Point2d a, Point2d b, int seg, int segs)<br />{<br />	return Pt2d(<br />		a.x + ((b.x - a.x) / (double)segs) * seg,<br />		a.y + ((b.y - a.y) / (double)segs) * seg);<br />}<br /><br />Point2d *<br />mag2d(Point2d *a, int step)<br />{<br />	return setpt2d(a,<br />		abs(a-&gt;x / step) * step,<br />		abs(a-&gt;y / step) * step);<br />}<br /><br />int<br />equ2d(Point2d *a, Point2d *b)<br />{<br />	return a-&gt;x