🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

vatrix

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vatrix - npm Package Compare versions

Comparing version

to
0.0.3

index.js

54

package.json
{
"name": "vatrix",
"description": "Vector and matrix tools",
"version": "0.0.1",
"description": "matrix tools",
"version": "0.0.3",
"scripts": {
"test": "mocha",
"prepublish": "npm test"
},
"dependencies": {
"totemizer": "~0.0.5",
"momentum": "~0.1.2"
},
"devDependencies": {
"mocha": "*",
"expect.js": "*"
},
"repository": {
"type":"git",
"url": "git://github.com/ashnur/vatrix.git"
"type": "git",
"url": "https://github.com/ashnur/vatrix.git"
},

@@ -13,12 +25,30 @@ "bugs": {

"main": "index.js",
"scripts": {
"test": "mocha test/*.js"
"testling": {
"files": "test/*.js",
"browsers": [
"iexplore/6.0",
"iexplore/7.0",
"iexplore/8.0",
"iexplore/9.0",
"iexplore/10.0",
"chrome/4.0",
"chrome/23.0",
"firefox/3.0",
"firefox/17.0",
"opera/10.0",
"opera/12.0",
"safari/5.0.5",
"safari/5.1"
],
"harness": "mocha"
},
"dependencies": {},
"devDependencies": {
"mocha": "*",
"express.js": "*"
},
"keywords": [
"vatrix",
"vatrices",
"matrix",
"matrices"
],
"author": "ashnur",
"license": "DAFUQ"
"license": "DAFUQ",
"readmeFilename": "README.md"
}

@@ -14,10 +14,23 @@ vatrix

There isn't a good, performant vectorn, matrixn library for javascript. And I need it.
There is of course [matrixjs](https://npmjs.org/package/matrixjs), but to be hones I do not like to much recursive implementations and it uses floats, which I am not a fan of.
# Support
[![browser support](http://ci.testling.com/ashnur/vatrix.png)](http://ci.testling.com/ashnur/vatrix)
## Example
### vatrix
The goal is to have a conviently usable general vector tool. This means that some of the functions can take arguments with various types.
I've decided not to check for arguments which doesn't make sense (like providing numbers instead of arrays to vectorAddition()).
If you get exceptions complaining about something related to arrays, chances are you've given a number somewhere where it doesn't make sense.
### Scalar multiplication
```javascript
var vatrix = require('vatrix')
var vatrix = require('vatrix');
vatrix.vectorMultiply([1,3,5,7,11,13], 13); //[13,39,65,91,143,169]
```

@@ -24,0 +37,0 @@