Get the normal vector of a 3D triangle
Takes a list of vertices in a triangle, and returns the normal vector for that triangle. Doesn't handle degenerate triangles.
The first 9 arguments are for the points on your triangle, with an optional
output array to set the resulting parameters. If an
ouput is not supplied,
a new array will be created, and either way this array will be returned as the
result of the function, e.g.:
var normal = require'triangle-normal'var output = 0 0 0var vectors =x: 0 y: 0 z: 0x: 1 y: 0 z: 0x: 0 y: 1 z: 0normalvectors0x vectors0y vectors0zvectors1x vectors1y vectors1zvectors2x vectors2y vectors2zoutput