Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Simple complex numbers arithmetic operations
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.gitignore
.npmignore
LICENSE
README.md
package.json
test.js

README.md

Complexo

Simple complex numbers arithmetic operations.

Installation

Via npm on Node:

npm install complexo

Usage

Reference in your program:

var cx = require('complexo');

Usage

// create number 3 + 4i
var cnumber = cx.create(3, 4);
// toString
cnumber.toString(); // "3 + 4i"
// inverse
cnumber.inv();
// add to cnumber
var newcnumber = cnumber.add(cnumber2);
// subtract cnumber
newcnumber = cnumber.sub(cnumber2);
// multiply cnumber
newcnumber = cnumber.mult(cnumber2);
// divide cnumber
newcnumber = cnumber.div(cnumber2);
// conjugate
newcnumber = cnumber.conj();

Development

git clone git://github.com/ajlopez/Complexo.git
cd Complexo
npm install
npm test

Versions

  • 0.0.1 Published

Samples

TBD

License

MIT

Contribution

Feel free to file issues and submit pull requests — contributions are welcome<

If you submit a pull request, please be sure to add or update corresponding test cases, and ensure that npm test continues to pass.

Something went wrong with that request. Please try again.