Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

geomagnetic-coords

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

geomagnetic-coords - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

dist/findMagneticPole.d.ts

11

package.json
{
"name": "geomagnetic-coords",
"description": "Dependency-free geomagnetic<-->geographic coordinate transformer ",
"version": "0.0.1",
"version": "0.0.2",
"author": "Joseph Beuckman <joebeuckman@gmail.com> (jbeuckm.github.io)",

@@ -11,5 +11,7 @@ "repository": {

"type": "module",
"main": "index.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"test": "jest"
"test": "jest",
"prepublish": "tsc"
},

@@ -19,4 +21,5 @@ "devDependencies": {

"@babel/preset-typescript": "^7.23.3",
"jest": "^29.7.0"
"jest": "^29.7.0",
"typescript": "^5.3.3"
}
}

@@ -1,9 +0,9 @@

export function multiplyVectorByMatrix(vector, matrix) {
export function multiplyVectorByMatrix(vector: number[], matrix: number[][]) {
// Check if the vector and matrix are compatible for multiplication
if (vector.length !== matrix[0].length) {
throw new Error('Incompatible dimensions for multiplication')
throw new Error("Incompatible dimensions for multiplication");
}
// Initialize the result vector with zeros
let result = Array(matrix.length).fill(0)
let result = Array(matrix.length).fill(0);

@@ -13,7 +13,7 @@ // Perform the multiplication

for (let j = 0; j < vector.length; j++) {
result[i] += matrix[i][j] * vector[j]
result[i] += matrix[i][j] * vector[j];
}
}
return result
return result;
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc