# matrix-rotate

> Rotate a 2D matrix by 90 degrees clockwise with one command

Latest version **0.0.2** (published 2014-10-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install matrix-rotate
pnpm add matrix-rotate
yarn add matrix-rotate
bun add matrix-rotate
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2014-10-13 |
| First published | 2014-10-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Graeme Boy |
| Maintainers | graemeboy |
| Keywords | matrix, rotation, 2d, array |

## Links

- npm: https://www.npmjs.com/package/matrix-rotate
- Repository: https://github.com/graemeboy/matrix-rotate
- Issues: https://github.com/graemeboy/matrix-rotate/issues
- npm.io page: https://npm.io/package/matrix-rotate

## Recent versions

- 0.0.2 (latest) — 2014-10-13
- 0.0.1 — 2014-10-13

## README

matrix-rotate
=============

Rotate a 2D JavaScript array in place by 90 degrees, with a simple command.

Example:

````javascript
var rotate = require('matrix-rotate');

var matrix = [
	[1,2,3,4],
	[5,6,7,8],
	[9,10,11,12],
	[13,14,15,16]
];

rotate(matrix);

console.log(matrix);
/*
	Output:
	[ 
		[ 13, 9, 5, 1 ],
	  	[ 14, 10, 6, 2 ],
	  	[ 15, 11, 7, 3 ],
	  	[ 16, 12, 8, 4 ] 
  	];
 */
````
### Installation
````javascript
npm install matrix-rotate
````

#### Preconditions
* Matrices are square (it cannot rotate a non-square matrix).

---
_Source: https://npm.io/package/matrix-rotate · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
