Add comments

This commit is contained in:
Luca Conte 2022-11-03 15:47:29 +01:00
parent e54b513628
commit a15fda5694
1 changed files with 7 additions and 1 deletions

View File

@ -1,4 +1,7 @@
import java.awt.Point;
/**
* Klasse zum Skalieren von Punkten
*/
public class Scale {
public static void main(String[] args) {
int x= 4;
@ -10,7 +13,10 @@ public class Scale {
System.out.println(p.x + " " + p.y);
}
/**
* Skaliert einen Punkt "p" um den Faktor "faktor"
* Keine Rueckgabe, Skalierung erfolgt per reference
*/
public static void skaliere(Point p, int faktor) {
p.setLocation(p.x * faktor, p.y * faktor);
}