Skip to content

Commit

Permalink
Merge pull request #170 from Exabyte-io/fix/SOF-7479
Browse files Browse the repository at this point in the history
SOF-7479: fix mathjs
  • Loading branch information
timurbazhirov authored Nov 1, 2024
2 parents f99bffd + 68c0dd0 commit bdc76a7
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 41 deletions.
2 changes: 1 addition & 1 deletion dist/js/tools/surface.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function getMillerScalingMatrix(cell, millerIndices, tol = 1e-8) {
* @return {Number[][]}
*/
function getDimensionsScalingMatrix(bulkCell, surfaceCell, outOfPlaneAxisIndex, thickness, vx, vy) {
const transformationMatrix = math_1.default.eye(3).toArray();
const transformationMatrix = math_1.default.identity(3).toArray();
const vxIndex = outOfPlaneAxisIndex === 2 ? 0 : outOfPlaneAxisIndex + 1;
const vyIndex = vxIndex === 2 ? 0 : vxIndex + 1;
transformationMatrix[outOfPlaneAxisIndex] = MULT(thickness, transformationMatrix[outOfPlaneAxisIndex]);
Expand Down
82 changes: 44 additions & 38 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@babel/register": "^7.22.15",
"@babel/runtime-corejs3": "^7.16.8",
"@exabyte-io/eslint-config": "^2023.8.29-1",
"@mat3ra/code": "2024.6.4-0",
"@mat3ra/code": "2024.10.4-0",
"@mat3ra/esse": "2024.6.4-1",
"@mat3ra/tsconfig": "2024.6.3-0",
"@types/crypto-js": "^4.2.2",
Expand Down
2 changes: 1 addition & 1 deletion src/js/tools/surface.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function getMillerScalingMatrix(cell, millerIndices, tol = 1e-8) {
* @return {Number[][]}
*/
function getDimensionsScalingMatrix(bulkCell, surfaceCell, outOfPlaneAxisIndex, thickness, vx, vy) {
const transformationMatrix = math.eye(3).toArray();
const transformationMatrix = math.identity(3).toArray();
const vxIndex = outOfPlaneAxisIndex === 2 ? 0 : outOfPlaneAxisIndex + 1;
const vyIndex = vxIndex === 2 ? 0 : vxIndex + 1;

Expand Down

0 comments on commit bdc76a7

Please sign in to comment.