<commit_before>vektor
---
A robotics-focused linear algebra module

### About
This code was officially presented at JSConf US 2013. There are slides from the talk here: [AI.js: Robots with Brains](https://t.co/6A5cu2JF58)

### Install
`npm install vektor`

### Vectors

#### initializing a vector
```` js
var v = require('vektor').vector;

var a = new v(1, 0, 0);
// or
var b = new v({x: 1, y: 0, z: 0});
````
Vectors can be initialized with 2 or 3 arguments only.

#### add two vectors
```` js
var a = new v(1, 0, 0);
var b = new v(1, 2, 3);

var c = a.add(b); // [2, 2, 3]
````

#### dot product
```` js
var a = new v(1, 0, 0);
var b = new v(1, 2, 3);

var c = a.dot(b); // 1
````

#### cross product
```` js
var a = new v(1, 0, 0);
var b = new v(1, 2, 3);

var c = a.cross(b); // [0, -3, 2]
````

#### distance between two vectors
```` js
var a = new v(1, 0, 0);
var b = new v(1, 2, 3);

var c = a.distanceFrom(b); // 3.6
````

#### length
```` js
var a = new v(1, 2, 3);

var c = a.length(); // 3.74
````



### Matrices
* set
* get
* add
* dot (multiply)
* transpose

### Homogenous Matrices (aka Transforms)
* Rotations
* Translations

### Examples
* Manipulator

### Coming Soon
* Tutorials :-)

### Contributions
_Please, please, please help make this module more robust!_

* Send in pull requests (make sure the tests pass)
* Discuss additional features in the Issues section
* Add your name and Github handle here:
    * <NAME> - [rwldrn](https://github.com/rwldrn)
    * <NAME> - [ForbesLindesay](https://github.com/ForbesLindesay)
<commit_msg>cleans up the vector section a little bit<commit_after>vektor
---
A robotics-focused linear algebra module

### About
This code was officially presented at JSConf US 2013. There are slides from the talk here: [AI.js: Robots with Brains](https://t.co/6A5cu2JF58)

### Install
`npm install vektor`

### Vectors

#### initializing a vector
```` js
var v = require('vektor').vector;

var a = new v(1, 0, 0);
// or
var b = new v({x: 1, y: 2, z: 3});
````

Note: Vectors can be initialized with 2 or 3 arguments only.

#### add two vectors
```` js
var c = a.add(b); // [2, 2, 3]
````

#### dot product
```` js
var c = a.dot(b); // 1
````

#### cross product
```` js
var c = a.cross(b); // [0, -3, 2]
````

#### distance between two vectors
```` js
var c = a.distanceFrom(b); // 3.6
````

#### length
```` js
var c = b.length(); // 3.74
````

### Matrices
* set
* get
* add
* dot (multiply)
* transpose

### Homogenous Matrices (aka Transforms)
* Rotations
* Translations

### Examples
* Manipulator

### Coming Soon
* Tutorials :-)

### Contributions
_Please, please, please help make this module more robust!_

* Send in pull requests (make sure the tests pass)
* Discuss additional features in the Issues section
* Add your name and Github handle here:
    * <NAME> - [rwldrn](https://github.com/rwldrn)
    * <NAME> - [ForbesLindesay](https://github.com/ForbesLindesay)

{'fraction_non_alphanumeric': 0.18446269678302532, 'fraction_numerical': 0.029089664613278575, 'mean_word_length': 3.483128834355828, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2385594', 'n_tokens_mistral': 1148, 'n_tokens_neox': 1051, 'n_words': 384}