ref: a435467f81a1d9d429109f3a34988c642bed6035 dir: /libgeometry/triangle.c/
#include <u.h> #include <libc.h> #include "../geometry.h" Point3 centroid(Triangle3 t) { return divpt3(addpt3(t.p0, addpt3(t.p1, t.p2)), 3); }