Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions LLama/Native/LLamaPos.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,24 @@ private LLamaPos(int value)
/// <param name="value"></param>
/// <returns></returns>
public static implicit operator LLamaPos(int value) => new(value);

/// <summary>
/// Increment this position
/// </summary>
/// <param name="pos"></param>
/// <returns></returns>
public static LLamaPos operator ++(LLamaPos pos)
{
return new LLamaPos(pos.Value + 1);
}

/// <summary>
/// Increment this position
/// </summary>
/// <param name="pos"></param>
/// <returns></returns>
public static LLamaPos operator --(LLamaPos pos)
{
return new LLamaPos(pos.Value - 1);
}
}