File:  [Research Unix] / researchv9 / jerq / src / lib / C / arith.c
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:32:07 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv9-SUN3, HEAD
researchv9-SUN3

#include <CC/jerq.h>

#define min(x,y)	((x < y) ? x : y)
#define max(x,y)	((x > y) ? x : y)

Rectangle Rectangle.mbb(Point p)
{
	Rectangle r;
	r.o.x = min(o.x,p.x);
	r.o.y = min(o.y,p.y);
	r.c.x = max(c.x,p.x);
	r.c.y = max(c.y,p.y);
	return r;
}

Rectangle Rectangle.mbb(Rectangle r)
{
	r.o.x = min(o.x,r.o.x);
	r.o.y = min(o.y,r.o.y);
	r.c.x = max(c.x,r.c.x);
	r.c.y = max(c.y,r.c.y);
	return r;
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.