Socket
Socket
Sign inDemoInstall

complex.js

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

complex.js - npm Package Compare versions

Comparing version 2.0.14 to 2.0.15

2

bower.json
{
"name": "complex.js",
"main": "complex.js",
"version": "2.0.14",
"version": "2.0.15",
"homepage": "https://github.com/infusion/Complex.js",

@@ -6,0 +6,0 @@ "description": "A complex number library",

@@ -13,4 +13,30 @@ type AValue =

export function Complex(a: AValue, b?: BValue): Complex;
/**
* @type {Complex}
*
* This class allows the manipulation of complex numbers.
* You can pass a complex number in different formats. Either as object, double, string or two integer parameters.
*
* Object form
* { re: <real>, im: <imaginary> }
* { arg: <angle>, abs: <radius> }
* { phi: <angle>, r: <radius> }
*
* Array / Vector form
* [ real, imaginary ]
*
* Double form
* 99.3 - Single double value
*
* String form
* '23.1337' - Simple real number
* '15+3i' - a simple complex number
* '3-i' - a simple complex number
*
* Example:
*
* var c = new Complex('99.3+8i');
* c.mul({r: 3, i: 9}).div(4.9).sub(3, 2);
*
*/

@@ -21,3 +47,3 @@ export class Complex {

constructor(a: AValue, b: BValue);
constructor(a: AValue, b?: BValue);

@@ -33,3 +59,3 @@ /**

*/
add(a: AValue, b: BValue): Complex;
add(a: AValue, b?: BValue): Complex;
/**

@@ -39,3 +65,3 @@ * Subtracts two complex numbers

*/
sub(a: AValue, b: BValue): Complex;
sub(a: AValue, b?: BValue): Complex;
/**

@@ -45,3 +71,3 @@ * Multiplies two complex numbers

*/
mul(a: AValue, b: BValue): Complex;
mul(a: AValue, b?: BValue): Complex;
/**

@@ -51,3 +77,3 @@ * Divides two complex numbers

*/
div(a: AValue, b: BValue): Complex;
div(a: AValue, b?: BValue): Complex;
/**

@@ -57,3 +83,3 @@ * Calculate the power of two complex numbers

*/
pow(a: AValue, b: BValue): Complex;
pow(a: AValue, b?: BValue): Complex;
/**

@@ -248,3 +274,3 @@ * Calculate the complex square root

*/
equals(a: AValue, b: BValue): boolean;
equals(a: AValue, b?: BValue): boolean;
/**

@@ -251,0 +277,0 @@ * Clones the actual object

/**
* @license Complex.js v2.0.14 12/05/2020
* @license Complex.js v2.0.15 12/05/2020
*

@@ -4,0 +4,0 @@ * Copyright (c) 2020, Robert Eisele (robert@xarg.org)

/*
Complex.js v2.0.14 12/05/2020
Complex.js v2.0.15 12/05/2020

@@ -4,0 +4,0 @@ Copyright (c) 2020, Robert Eisele (robert@xarg.org)

@@ -6,4 +6,4 @@ {

"title": "complex.js",
"version": "2.0.14",
"description": "A complex number library",
"version": "2.0.15",
"description": "A complex numbers library",
"keywords": [

@@ -10,0 +10,0 @@ "complex numbers",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc