combine method

UPatternPoint combine(
  1. double i,
  2. double j,
  3. double newModuleSize
)

Implementation

UPatternPoint combine(double i, double j, double newModuleSize) {
  final int combinedCount = count + 1;
  return UPatternPoint(
    (count * x + j) / combinedCount,
    (count * y + i) / combinedCount,
    (count * estimatedModuleSize + newModuleSize) / combinedCount,
    combinedCount,
  );
}