|
using System;
using System.Collections;
namespace ParticleSwarm {
public class ParticleComparer : IComparer {
public int Compare(object x, object y) {
Particle px = x as Particle;
Particle py = y as Particle;
if (px == null || py == null) { return 0; }
return px.Location.Z.CompareTo(py.Location.Z);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I've been in software development for more than a decade now. Originally with ASP 2.0 and VB6. I worked in Japan for a year doing Java. And have been with C# ever since.
In 2005 I founded
BoneSoft Software where I sell a small number of developer tools.