We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa6315a commit 78faf11Copy full SHA for 78faf11
JavaScript/8-geometry.js
@@ -7,7 +7,7 @@ class Point {
7
}
8
9
10
-class Polygone {
+class Polygon {
11
constructor(...points) {
12
this.points = points;
13
@@ -17,7 +17,7 @@ class Polygone {
17
18
19
20
-class Rect extends Polygone {
+class Rect extends Polygon {
21
constructor(x1, y1, x2, y2) {
22
const a = new Point(x1, y1);
23
const b = new Point(x2, y1);
@@ -27,7 +27,7 @@ class Rect extends Polygone {
27
28
29
30
-class Triangle extends Polygone {
+class Triangle extends Polygon {
31
constructor(x1, y1, x2, y2, x3, y3) {
32
33
const b = new Point(x2, y2);
@@ -37,8 +37,8 @@ class Triangle extends Polygone {
37
38
39
class Geometry {
40
- static rotate(polygone, angle) {
41
- const { points } = polygone;
+ static rotate(polygon, angle) {
+ const { points } = polygon;
42
const radians = Math.PI / 180 * angle;
43
const sin = Math.sin(radians);
44
const cos = Math.cos(radians);
0 commit comments