Skip to main content

complex

A complex number that takes the form of an array of two floats. The first element is the real number and the second represents the imaginary.

re​

re() 

Returns the real part of a complex number.

A complex number.

im​

im() 

Returns the imaginary part of a complex number.

A complex number.

mul​

mul() 

Multiplies two complex numbers together and returns the result

.

The complex number on the left hand side.

The complex number on the right hand side.

conj​

conj() 

Calculates the conjugate of a complex number.

A complex number.

dot​

dot() 

Calculates the dot product of two complex numbers in R^2

.

The complex number on the left hand side.

The complex number on the right hand side.

normsq​

normsq() 

Calculates the squared normal of a complex number.

The complex number.

norm​

norm() 

Calculates the normal of a complex number

The complex number.

scale​

scale() 

Multiplies a complex number by a scale factor.

The complex number to scale.

The scale factor.

unit​

unit() 

Returns a unit vector in the direction of a complex number.

The complex number.

inv​

inv() 

Inverts a complex number.

The complex number

div​

div() 

Divides two complex numbers.

The complex number of the numerator.

The complex number of the denominator.

add​

add() 

Adds two complex numbers together.

The complex number on the left hand side.

The complex number on the right hand side.

sub​

sub() 

Subtracts two complex numbers together.

The complex number on the left hand side.

The complex number on the right hand side.

arg​

arg() 

Calculates the argument of a complex number.

The complex number.

ang​

ang() 

Get the signed angle of two complex numbers from V to W.

A complex number.

A complex number.