about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/algorithms/2d-transformations/Scaling.svelte2
-rw-r--r--src/algorithms/2d-transformations/Translation.svelte8
2 files changed, 3 insertions, 7 deletions
diff --git a/src/algorithms/2d-transformations/Scaling.svelte b/src/algorithms/2d-transformations/Scaling.svelte
index 9f17fd1..a08d5ce 100644
--- a/src/algorithms/2d-transformations/Scaling.svelte
+++ b/src/algorithms/2d-transformations/Scaling.svelte
@@ -32,7 +32,7 @@
   }
 
   function solve() {
-    let scale_mat = [[scale_factor.x, 0], [0, scale_factor.y]];
+    const scale_mat = [[scale_factor.x, 0], [0, scale_factor.y]];
 
     scaled_points = [[], []];
     // Deep copy.
diff --git a/src/algorithms/2d-transformations/Translation.svelte b/src/algorithms/2d-transformations/Translation.svelte
index 1fff3e9..4ae0ef7 100644
--- a/src/algorithms/2d-transformations/Translation.svelte
+++ b/src/algorithms/2d-transformations/Translation.svelte
@@ -23,13 +23,9 @@
     points = points.filter(item => item.id !== Number(id));
   }
 
-  let pointsArray = {x: [], y: []};
-  let translatedPointsArray = {x: [], y: []};
-
   function translatePoints() {
-    // Reset values.
-    pointsArray = {x: [], y: []};
-    translatedPointsArray = {x: [], y: []}
+    let pointsArray = {x: [], y: []};
+    let translatedPointsArray = {x: [], y: []};
 
     // Store the points in a matrix like array.
     for (const point of points) {
2.0.0&id=567a66d30fb86ad144e3deec256e27d05a611c2d'>^
5b59ba3 ^





8fbced8 ^
c5ea653 ^
5b59ba3 ^


53f2d63 ^
5b59ba3 ^
c5ea653 ^
53f2d63 ^
5b59ba3 ^
c5ea653 ^

5b59ba3 ^
53f2d63 ^

5b59ba3 ^
8fbced8 ^










5b59ba3 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51