ComplexPolar

com.phasmidsoftware.number.core.numerical.ComplexPolar
See theComplexPolar companion class
object ComplexPolar

Companion object for the ComplexPolar class. Provides factory methods for creating instances of ComplexPolar with various parameters.

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror

Value members

Concrete methods

Creates a ComplexPolar object based on the provided magnitude. If the input number has a root (NthRoot), it calculates using the root and sets a default angle. Otherwise, it uses zero as the angle.

Creates a ComplexPolar object based on the provided magnitude. If the input number has a root (NthRoot), it calculates using the root and sets a default angle. Otherwise, it uses zero as the angle.

Value parameters

r

a Number representing the magnitude of the ComplexPolar object

Attributes

Returns

a ComplexPolar object with the specified magnitude and calculated or default angle

def apply(r: Int, theta: Number): ComplexPolar

Creates a ComplexPolar object from an integer magnitude and a specified angle.

Creates a ComplexPolar object from an integer magnitude and a specified angle.

Value parameters

r

an integer representing the radius (magnitude) of the ComplexPolar object

theta

a Number representing the angle (theta) of the ComplexPolar object

Attributes

Returns

a ComplexPolar object with the specified magnitude and angle

def apply(r: Number, theta: Number): ComplexPolar

Factory method to create a ComplexPolar instance using the specified magnitude and angle.

Factory method to create a ComplexPolar instance using the specified magnitude and angle.

Value parameters

r

the magnitude of the ComplexPolar object, represented as a Number

theta

the angle of the ComplexPolar object, represented as a Number

Attributes

Returns

a ComplexPolar instance with the specified magnitude and angle, and a default branch count of 1

def apply(r: Number, theta: Number, n: Int): ComplexPolar

Constructs a ComplexPolar object based on the given magnitude, angle, and root count. Adjusts or modulates the angle as necessary based on its type and value.

Constructs a ComplexPolar object based on the given magnitude, angle, and root count. Adjusts or modulates the angle as necessary based on its type and value.

Value parameters

n

the root count, specifying the number of branches; typically an integer greater than or equal to 1

r

the magnitude of the ComplexPolar object, represented as a Number

theta

the angle of the ComplexPolar object, represented as a Number in radians

Attributes

Returns

a ComplexPolar object with the specified magnitude, angle (modulated if necessary), and root count

Note

Throws CoreException if the provided angle does not match the expected format or type

def apply(r: String, i: String): ComplexPolar

Creates a ComplexPolar object using the given string representations of the magnitude and angle.

Creates a ComplexPolar object using the given string representations of the magnitude and angle.

Value parameters

i

a string representing the angle of the ComplexPolar object

r

a string representing the magnitude of the ComplexPolar object

Attributes

Returns

a ComplexPolar object with the specified magnitude and angle

def ±(x: Number): Field

Method to create a ComplexPolar object with two branches.

Method to create a ComplexPolar object with two branches.

Value parameters

x

a Number representing the real part.

Attributes

Returns

a ComplexPolar of magnitude x, and two points along the x-axis the 0 mid-way between.