Add comments
This commit is contained in:
parent
e54b513628
commit
a15fda5694
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue