<commit_before>SAT.js
======

 - [Classes](#classes)
 - [Collision Tests](#tests)
 - [Examples](#examples)
 
About
-----

SAT.js is a simple JavaScript library for performing collision detection (and projection-based collision response) of simple 2D shapes.  It uses the [Separating Axis Theorem](http://en.wikipedia.org/wiki/Hyperplane_separation_theorem) (hence the name)

It supports detecting collisions between:
 - Circles (using Vornoi Regions.)
 - Convex Polygons (and simple Axis-Aligned Boxes, which are of course, convex polygons.)

It also supports checking whether a point is inside a circle or polygon.

It's released under the [MIT](http://en.wikipedia.org/wiki/MIT_License) license.

Current version: `0.4.1`. [Annotated source code](http://jriecken.github.io/sat-js/docs/SAT.html) is available.

Nicely compresses with the [Google Closure Compiler](https://developers.google.com/closure/compiler/) in **Advanced** mode to about 6KB (2KB gzipped)
 
<a name="classes"></a>
Classes
--------

SAT.js contains the following JavaScript classes:

### SAT.Vector (aliased as SAT.V)

This is a simple 2D vector/point class.  It is created by calling:
```javascript
// Create the vector (10,10) - If (x,y) not specified, defaults to (0,0).<commit_msg>Indicate npm module name in README<commit_after>SAT.js
======

 - [Classes](#classes)
 - [Collision Tests](#tests)
 - [Examples](#examples)
 
About
-----

SAT.js is a simple JavaScript library for performing collision detection (and projection-based collision response) of simple 2D shapes.  It uses the [Separating Axis Theorem](http://en.wikipedia.org/wiki/Hyperplane_separation_theorem) (hence the name)

It supports detecting collisions between:
 - Circles (using Vornoi Regions.)
 - Convex Polygons (and simple Axis-Aligned Boxes, which are of course, convex polygons.)

It also supports checking whether a point is inside a circle or polygon.

It's released under the [MIT](http://en.wikipedia.org/wiki/MIT_License) license.

Current version: `0.4.1`. [Annotated source code](http://jriecken.github.io/sat-js/docs/SAT.html) is available.

Nicely compresses with the [Google Closure Compiler](https://developers.google.com/closure/compiler/) in **Advanced** mode to about 6KB (2KB gzipped)

To use it in node.js, you can run `npm install sat` and then use it with `var SAT = require('sat');`
 
<a name="classes"></a>
Classes
--------

SAT.js contains the following JavaScript classes:

### SAT.Vector (aliased as SAT.V)

This is a simple 2D vector/point class.  It is created by calling:
```javascript
// Create the vector (10,10) - If (x,y) not specified, defaults to (0,0).
{'fraction_non_alphanumeric': 0.12665908229048162, 'fraction_numerical': 0.009859689040576413, 'mean_word_length': 4.340080971659919, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '1388803', 'n_tokens_mistral': 847, 'n_tokens_neox': 783, 'n_words': 289}