almostZero method

bool almostZero([
  1. double precision = 1e-6
])

Check if a vector is almost zero

Implementation

bool almostZero([double precision = 1e-6]) {
  if (x.abs() > precision || y.abs() > precision || z.abs() > precision) {
    return false;
  }
  return true;
}