Skip to content

Commit

Permalink
Remove the unused Util.apply3dTransform method
Browse files Browse the repository at this point in the history
This method was originally added in PR 1157 (back in 2012), however its only call-site was then removed in PR 2423 (also in 2012).
Hence this method has been completely unused for nearly a decade, and it should thus be safe to remove it.
  • Loading branch information
Snuffleupagus committed Oct 7, 2022
1 parent 8629a55 commit 4b39b1c
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/shared/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -857,20 +857,6 @@ class Util {
];
}

// Apply a generic 3d matrix M on a 3-vector v:
// | a b c | | X |
// | d e f | x | Y |
// | g h i | | Z |
// M is assumed to be serialized as [a,b,c,d,e,f,g,h,i],
// with v as [X,Y,Z]
static apply3dTransform(m, v) {
return [
m[0] * v[0] + m[1] * v[1] + m[2] * v[2],
m[3] * v[0] + m[4] * v[1] + m[5] * v[2],
m[6] * v[0] + m[7] * v[1] + m[8] * v[2],
];
}

// This calculation uses Singular Value Decomposition.
// The SVD can be represented with formula A = USV. We are interested in the
// matrix S here because it represents the scale values.
Expand Down

0 comments on commit 4b39b1c

Please sign in to comment.