Add math utility class
This commit is contained in:
parent
10a8a31520
commit
ead1943820
|
@ -0,0 +1,11 @@
|
|||
using System.Numerics;
|
||||
|
||||
namespace KeepersCompound.Lightmapper;
|
||||
|
||||
public static class MathUtils
|
||||
{
|
||||
public static float DistanceFromPlane(Plane plane, Vector3 point)
|
||||
{
|
||||
return Math.Abs(Vector3.Dot(plane.Normal, point) + plane.D) / plane.Normal.Length();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue