MCPcopy Create free account
hub / github.com/brainflow-dev/brainflow / fromPolar

Method fromPolar

nodejs_package/brainflow/complex.ts:195–198  ·  view source on GitHub ↗

* Static method to construct a complex number in rectangular form from polar coordinates * @param theta - The angle/arguement * @param magnitude - The magnitude * @returns Complex number in rectangular coordinates constructed from the arguement theta & the * magnitude

(theta: number, magnitude: number)

Source from the content-addressed store, hash-verified

193 * magnitude
194 */
195 public static fromPolar(theta: number, magnitude: number): complex
196 {
197 return new complex (magnitude * Math.cos(theta), magnitude * Math.sin(theta));
198 }
199
200 /**
201 * Get the complex number's polar coordinates as a tuple

Callers

nothing calls this directly

Calls 2

cosMethod · 0.80
sinMethod · 0.80

Tested by

no test coverage detected