signWithZeroTolerance method

int signWithZeroTolerance([
  1. double zeroTolerance = 1.0E-20
])

Implementation

int signWithZeroTolerance([double zeroTolerance = 1.0E-20]) {
  if (this > 0) {
    return this < zeroTolerance ? 0 : 1;
  } else {
    return this > -zeroTolerance ? 0 : -1;
  }
}