Point inside triangle and elevation

Job ID: 35647569

Budget: €30 – €250 EUR

The project consist of creating a PHP class without dependencies that first checks that a point is inside a triangle. If is not inside the triangle, return null
If the point is inside the triangle, calculate the elevation.
The class must have the ability to accept an array of triangle coordinates and find coordinates.
The code needs to be written taking into account PHP best practices, small functions and fully comment documented

X, Y Z
$p1=[795.80,1803.30,5.25];
$p2=[1701.36,1624.50,3.15];
$p3=[2095.10,1629.84,7.35];

Find Elevation for
$pFind1=[1846.19 , 1747.90];
$pFind2= [2097.00, 822.50];
Related categories: PHP Mathematics