about summary refs log tree commit diff stats
path: root/src/algorithms/2d-transformations
diff options
context:
space:
mode:
authorkarishmarajput <84656423+karishmarajput@users.noreply.github.com>2021-10-31 23:36:35 +0530
committerGitHub <noreply@github.com>2021-10-31 18:06:35 +0000
commit7b0858eca535110a18af0b1659668ead2a6ec277 (patch)
treeefab7059d26441bbf96404f5cd31f56266172795 /src/algorithms/2d-transformations
parentb7f1547d026dd8f3a18660f713634bcb605c183f (diff)
downloaddorado-7b0858eca535110a18af0b1659668ead2a6ec277.tar.gz
Make changes in Scaling (#7)
* Fix typo and delete unused variable

* Add : after solution

* Make changes in Scaling
Diffstat (limited to 'src/algorithms/2d-transformations')
-rw-r--r--src/algorithms/2d-transformations/Scaling.svelte4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/algorithms/2d-transformations/Scaling.svelte b/src/algorithms/2d-transformations/Scaling.svelte
index a08d5ce..8a2a5e2 100644
--- a/src/algorithms/2d-transformations/Scaling.svelte
+++ b/src/algorithms/2d-transformations/Scaling.svelte
@@ -34,12 +34,10 @@
   function solve() {
     const scale_mat = [[scale_factor.x, 0], [0, scale_factor.y]];
 
-    scaled_points = [[], []];
+    scaled_points = [new Array(points[0].length), new Array(points[0].length)];
     // Deep copy.
     points_after_fixed = JSON.parse(JSON.stringify(points));
     for (let i = 0; i < points[0].length; i++) {
-      scaled_points[0].push(0);
-      scaled_points[1].push(0);
 
       points_after_fixed[0][i] -= fixed_x;
       points_after_fixed[1][i] -= fixed_y;
James Booth <boothj5@gmail.com> 2016-09-03 22:26:14 +0100 committer James Booth <boothj5@gmail.com> 2016-09-03 22:26:14 +0100 Add travis build script' href='/danisanti/profani-tty/commit/travis-build.sh?id=b5b73ab8ff503a5ae6f253b27012235850cd73ed'>b5b73ab8 ^
3700c80a ^
06f8299e ^
b267b065 ^

3700c80a ^


968006e1 ^
3700c80a ^
0c7350e2 ^
9d1bd638 ^
3700c80a ^


9d1bd638 ^
3700c80a ^

0c7350e2 ^
3700c80a ^






3aafffde ^
3700c80a ^



968006e1 ^
3700c80a ^

9d1bd638 ^
3700c80a ^


9d1bd638 ^
3700c80a ^










b267b065 ^





5e750e1f ^
b267b065 ^




9d1bd638 ^
b267b065 ^


9d1bd638 ^
b267b065 ^










3700c80a ^

b267b065 ^
3700c80a ^

b267b065 ^
3700c80a ^
b267b065 ^
3700c80a ^
b267b065 ^




b267b065 ^

3700c80a ^
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131