@@ -7,7 +7,7 @@ class Point {
|
7 | 7 | }
|
8 | 8 | }
|
9 | 9 |
|
10 |
| -class Polygone { |
| 10 | +class Polygon { |
11 | 11 | constructor(...points) {
|
12 | 12 | this.points = points;
|
13 | 13 | }
|
@@ -17,7 +17,7 @@ class Polygone {
|
17 | 17 | }
|
18 | 18 | }
|
19 | 19 |
|
20 |
| -class Rect extends Polygone { |
| 20 | +class Rect extends Polygon { |
21 | 21 | constructor(x1, y1, x2, y2) {
|
22 | 22 | const a = new Point(x1, y1);
|
23 | 23 | const b = new Point(x2, y1);
|
@@ -27,7 +27,7 @@ class Rect extends Polygone {
|
27 | 27 | }
|
28 | 28 | }
|
29 | 29 |
|
30 |
| -class Triangle extends Polygone { |
| 30 | +class Triangle extends Polygon { |
31 | 31 | constructor(x1, y1, x2, y2, x3, y3) {
|
32 | 32 | const a = new Point(x1, y1);
|
33 | 33 | const b = new Point(x2, y2);
|
@@ -37,8 +37,8 @@ class Triangle extends Polygone {
|
37 | 37 | }
|
38 | 38 |
|
39 | 39 | class Geometry {
|
40 |
| -static rotate(polygone, angle) { |
41 |
| -const { points } = polygone; |
| 40 | +static rotate(polygon, angle) { |
| 41 | +const { points } = polygon; |
42 | 42 | const radians = Math.PI / 180 * angle;
|
43 | 43 | const sin = Math.sin(radians);
|
44 | 44 | const cos = Math.cos(radians);
|
|
0 commit comments