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;