/*
 * "Grundkurs Programmieren in Java - Band 2 (2. Auflage, 2006)I"
 * 2003-2006, Carl Hanser Verlag
 * Loesungsvorschlag zu Aufgabe 9.1 (Version 2.0)
 * (c) 2003-2006 D. Ratz, J. Scheffler, D. Seese, J. Wiesenberger
 *
 */

public class Punkt {

  private double x, y;

  public Punkt(double x, double y) { 
    this.x = x; this.y = y;
  }

  public double getX() {
    return this.x;
  }

  public double getY() {
    return this.y;
  }

  public void drehen (double phi) {
    double xAlt = this.x;
    this.x = this.x * Math.cos(phi) - y * Math.sin(phi);
    this.y = xAlt   * Math.sin(phi) + y * Math.cos(phi);
  }    

} // class Punkt
  
