Grid/LineExtensions.cs

A small extension class adding a Direction method to a Line type. It returns the normalized vector from Start to End.

using Sandbox;

namespace GridAStar;

public static class LineExtensions
{
	public static Vector3 Direction( this Line line ) => (line.End - line.Start).Normal;
}