# unityvector2

> ES6 2D vector class based on Vector2 from the Unity engine

Latest version **0.0.3** (published 2017-04-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install unityvector2
pnpm add unityvector2
yarn add unityvector2
bun add unityvector2
```

## 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.3 |
| Published | 2017-04-12 |
| First published | 2017-04-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jaiden Mispy |
| Maintainers | mispy |
| Keywords | vector |

## Links

- npm: https://www.npmjs.com/package/unityvector2
- Repository: https://github.com/mispy/unityvector2
- Issues: https://github.com/mispy/unityvector2/issues
- npm.io page: https://npm.io/package/unityvector2

## Recent versions

- 0.0.3 (latest) — 2017-04-12
- 0.0.2 — 2017-04-12
- 0.0.1 — 2017-04-12

## README

# unityvector2

An unofficial implementation of the [Unity Vector2](https://docs.unity3d.com/ScriptReference/Vector2.html) API as a standalone JS module. In case you just really wanted a Vector2 for doing data visualization or something. :)

## Installation

```
npm install --save unityvector2
```

## Usage

```
import Vector2 from 'unityvector2'

let a = new Vector2(0, 1)
let b = new Vector2(2, 0)

let c = a.Add(b) // (2, 1)
let d = a.Subtract(b) // (-2, 1)
let e = a.Multiply(2) // (0, 2)
let f = a.Divide(2) // (0, 0.5)
```

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