paintersAlgorithm method

int paintersAlgorithm(
  1. Triangle? a,
  2. Triangle? b
)

Implementation

int paintersAlgorithm(Triangle? a, Triangle? b){
  //return b.sumOfZ.compareTo(a.sumOfZ);
  if(a == null) return -1;
  if(b == null) return -1;
  final double az = a.z;
  final double bz = b.z;
  //return (az-bz).round();
  if (bz > az) return 1;
  if (bz < az) return -1;
  return 0;
}