1.0.0 • Published 9 years ago

root-of-unity v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

Root of unity Build Status

nth root of unity calculation using De Moivre's formula.

Install

$ npm install --save root-of-unity

Usage

The function expects an integer parameter greater than zero.

The result is an Array of Complex objects.

var rootOfUnity = require('root-of-unity');

rootOfUnity(3);
//=> [ { im: 0, real: 1 }, { im: 0.866, real: -0.5 }, { im: -0.8665, real: -0.5 } ]

License

root-of-unity is licensed under the MIT Open Source license. For more information, see the LICENSE file in this repository.