//
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
//
namespace MUnique.OpenMU.GameLogic;
using MUnique.OpenMU.Pathfinding;
///
/// Extensions for s.
///
public static class WalkingStepsExtensions
{
///
/// Gets the starting point of the specified walking steps.
///
/// The walking steps.
/// The starting point of the specified walking steps.
public static Point GetStart(this Memory steps)
{
return steps.Length == 0 ? default : steps.Span[0].From;
}
///
/// Gets the target point of the specified walking steps.
///
/// The walking steps.
/// The target point of the specified walking steps.
public static Point GetTarget(this Memory steps)
{
return steps.Length == 0 ? default : steps.Span[^1].To;
}
}