예제 #1
0
  /**
   * Further scale down the dot set with lesser area.
   *
   * @param dotSetOne
   * @param dotSetTwo
   */
  private void inverseMatchAreas(DotSet dotSetOne, DotSet dotSetTwo) {
    double totalAreaOne = dotSetOne.getTotalArea();
    double totalAreaTwo = dotSetTwo.getTotalArea();

    if (totalAreaOne > totalAreaTwo) {
      dotSetTwo.inverseMatchArea(totalAreaOne);
    } else {
      dotSetOne.inverseMatchArea(totalAreaTwo);
    }
  }
예제 #2
0
  /**
   * Make two dot sets have equal areas by scaling the dot set with greater area down.
   *
   * @param dotSetOne
   * @param dotSetTwo
   */
  private void matchAreas(DotSet dotSetOne, DotSet dotSetTwo) {
    double totalAreaOne = this.dotSetOne.getTotalArea();
    double totalAreaTwo = this.dotSetTwo.getTotalArea();

    if (totalAreaOne > totalAreaTwo) {
      dotSetOne.matchArea(totalAreaTwo);
    } else {
      dotSetTwo.matchArea(totalAreaOne);
    }
  }