28 lines · 370 B · C
RawDownload
#include <u.h>#include <libc.h>#include <geometry.h> intvfmt(Fmt *f){	Point2 p; 	p = va_arg(f->args, Point2);	return fmtprint(f, "[%g %g %g]", p.x, p.y, p.w);} intVfmt(Fmt *f){	Point3 p; 	p = va_arg(f->args, Point3);	return fmtprint(f, "[%g %g %g %g]", p.x, p.y, p.z, p.w);} voidGEOMfmtinstall(void){	fmtinstall('v', vfmt);	fmtinstall('V', Vfmt);}