ThiefLightmapper/KeepersCompound.Lightmapper/MathUtils.cs

11 lines
272 B
C#
Raw Normal View History

2024-09-24 07:11:35 +00:00
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();
}
}