Filters an array of point-like objects to only those contained within a triangle.
returnFirst is true, will return an array containing only the first point in the provided array that is within the triangle (or an empty array if there are no such points).
The triangle that the points are being checked in.
An array of point-like objects (objects that have an
If provided, the points that are within the triangle will be appended to this array instead of being added to a new array. If
An array containing all the points from
points that are within the triangle, if an array was provided as
out, points will be appended to that array and it will also be returned here.