#include <draw.h>

#include <geometry.h>

Point3 add3(Point3 a, Point3 b)

Point3 sub3(Point3 a, Point3 b)

Point3 neg3(Point3 a)

Point3 div3(Point3 a, double b)

Point3 mul3(Point3 a, double b)

int eqpt3(Point3 p, Point3 q)

int closept3(Point3 p, Point3 q, double eps)

double dot3(Point3 p, Point3 q)

Point3 cross3(Point3 p, Point3 q)

double len3(Point3 p)

double dist3(Point3 p, Point3 q)

Point3 unit3(Point3 p)

Point3 midpt3(Point3 p, Point3 q)

Point3 lerp3(Point3 p, Point3 q, double alpha)

Point3 reflect3(Point3 p, Point3 p0, Point3 p1)

Point3 nearseg3(Point3 p0, Point3 p1, Point3 testp)

double pldist3(Point3 p, Point3 p0, Point3 p1)

double vdiv3(Point3 a, Point3 b)

Point3 vrem3(Point3 a, Point3 b)

Point3 pn2f3(Point3 p, Point3 n)

Point3 ppp2f3(Point3 p0, Point3 p1, Point3 p2)

Point3 fff2p3(Point3 f0, Point3 f1, Point3 f2)

Point3 pdiv4(Point3 a)

Point3 add4(Point3 a, Point3 b)

Point3 sub4(Point3 a, Point3 b)