UnityMol  0.9.6-875
UnityMol viewer / In developement
StructComparer.cs
Go to the documentation of this file.
1 
66 using UnityEngine;
67 using System.Collections;
68 
69 //For the sorting of the particle system.
70 public class StructComparer : IComparer
71 {
72  public int Compare(object x, object y)
73  {
74  if (!(x is float[]) || !(y is float[])) return 0;
75  float[] a = (float[])x;
76  float[] b = (float[])y;
77 
78  return a[0].CompareTo(b[0]);
79  }
80 }
int Compare(object x, object y)