Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Position2D.cs : How to get sort order in 2d space (and probably 3d space) #11

Open
nullorvoid opened this issue Aug 15, 2016 · 0 comments
Labels

Comments

@nullorvoid
Copy link
Contributor

nullorvoid commented Aug 15, 2016

Implementing the IComparable means that we have to implement the correct sorting order, I am thinking of using the value from 0 to do the ordering.

For instance:

Addition:
4|5|6
3|4|5
2|3|4

Multiplication:
3|6|9
2|4|6
1|2|3

Square + Addition:
10|13|18
05|08|13
01|05|10

Simple List:
7|8|9
4|5|6
1|2|3

This will probably be extended into 3d later so the system should work as such. The main question is whether or not we need to do this or whether we can implement IEqualityComparer for these interfaces and that will all that's required.

msdn

Tests also required and will be TODO in PositionTests.cs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant