src/main/java/chalmers/pimp/model/LayerRotation.java
void start(Point rotationAnchorPoint, int baseDegree, Point mouseStartPoint,
      ModelMemento memento) {
    Objects.requireNonNull(memento);
    Objects.requireNonNull(rotationAnchorPoint);
    Objects.requireNonNull(mouseStartPoint);
    if (!isFinished) {
      this.rotationAnchorPoint = rotationAnchorPoint;
      this.memento = Objects.requireNonNull(memento);
      //The new rotation is added to the old rotation of this layer, think of it as a mouse pad. Same movement can be repeated several times and add movement to the mouse position.
      this.baseDegree = baseDegree;
      currentDegree = baseDegree;
      //All rotation is based on the movement of the mouse, regardless of it's distance to the layer center.
      setMouseStartDegree(mouseStartPoint.getX(), mouseStartPoint.getY());
    }
  }
/**
   * Starts the layer rotation. This method has no effect if the {@link LayerMovement#stop()} method
   * has been called on the layer rotation instance.
   *
   * @param rotationAnchorPoint the center point for the layer to rotate.
   * @param baseDegree          the start rotation for the layer before the rotation has started.
   * @param mouseStartPoint     the start position of the mouse.
   * @param memento             a model memento instance that represents the state of the model
   *                            before the rotation has begun.
   * @throws NullPointerException if the supplied model memento is {@code null}.
   */
Starts the layer rotation. This method has no effect if the  LayerMovement#stop() method
has been called on the layer rotation instance.

@param rotationAnchorPoint the center point for the layer to rotate.
@param baseDegree          the start rotation for the layer before the rotation has started.
@param mouseStartPoint     the start position of the mouse.
@param memento             a model memento instance that represents the state of the model
before the rotation has begun.
@throws NullPointerException if the supplied model memento is  null.
Starts the layer rotation . This method has no effect if the LayerMovement#stop () method has been called on the layer rotation instance . @param rotationAnchorPoint the center point for the layer to rotate . @param baseDegree the start rotation for the layer before the rotation has started . @param mouseStartPoint the start position of the mouse . @param memento a model memento instance that represents the state of the model before the rotation has begun . @throws NullPointerException if the supplied model memento is null .
void start(Point rotationAnchorPoint, int baseDegree, Point mouseStartPoint,
      ModelMemento memento) {
    Objects.requireNonNull(memento);
    Objects.requireNonNull(rotationAnchorPoint);
    Objects.requireNonNull(mouseStartPoint);
    if (!isFinished) {
      this.rotationAnchorPoint = rotationAnchorPoint;
      this.memento = Objects.requireNonNull(memento);
      this.baseDegree = baseDegree;
      currentDegree = baseDegree;
      setMouseStartDegree(mouseStartPoint.getX(), mouseStartPoint.getY());
    }
  }
void start ( Point rotationAnchorPoint , int baseDegree , Point mouseStartPoint , ModelMemento memento ) { Objects . requireNonNull ( memento ) ; Objects . requireNonNull ( rotationAnchorPoint ) ; Objects . requireNonNull ( mouseStartPoint ) ; if ( ! isFinished ) { this . rotationAnchorPoint = rotationAnchorPoint ; this . memento = Objects . requireNonNull ( memento ) ; this . baseDegree = baseDegree ; currentDegree = baseDegree ; setMouseStartDegree ( mouseStartPoint . getX ( ) , mouseStartPoint . getY ( ) ) ; } }
Starts the layer rotation.
Starts the layer rotation .
//The new rotation is added to the old rotation of this layer, think of it as a mouse pad. Same movement can be repeated several times and add movement to the mouse position.
 //All rotation is based on the movement of the mouse, regardless of it's distance to the layer center.
