root-of-unity

1.0.0 • Public • Published

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.

Package Sidebar

Install

npm i root-of-unity

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • pbakondy