Function planeNormal

Compute normal of a plane from three points

Vector!(T,3) planeNormal(T) (
  Vector!(T,3) p1,
  Vector!(T,3) p2,
  Vector!(T,3) p3
);

Example

Vector3f n = planeNormal(
    Vector3f(0, 0, 0),
    Vector3f(0, 0, 1),
    Vector3f(1, 0, 0)
);
assert(isAlmostZero(n - Vector3f(0, 1, 0)));