isRhombus property

bool get isRhombus

Whether this is a rhombus

All four sides have equal length (and it's a parallelogram).

Implementation

bool get isRhombus {
  if (!isParallelogram) return false;
  final len = AB.length;
  return (BC.length - len).abs() < _epsilon &&
      (CD.length - len).abs() < _epsilon &&
      (DA.length - len).abs() < _epsilon;
}