thesadrogue / TheSadRogue.Primitives

A collection of primitive data structures for working with a 2-dimensional grid.
MIT License
21 stars 6 forks source link

Inconsistent Exception Behavior for ShiftRight and ShiftLeft Methods #97

Open Chris3606 opened 1 year ago

Chris3606 commented 1 year ago

Currently, if you pass an index and a count which overflow the edge of the backing array to the Shift* methods, they react differently. ShiftLeft will throw an ArgumentException, whereas ShiftRight will throw an IndexOutOfRange exception.

Ideally, this behavior would be consistent.