Record TImaginaryUnit

Unit

Declaration

type TImaginaryUnit = record

Description

Represents the imaginary unit i, defined by i² = -1.

This record has no fields: it acts as a compile-time constant used to construct TComplex numbers naturally via operator overloading (e.g. 3*i, 1 + 2*i, z*i). A global constant of this type (conventionally named i) should be declared to allow idiomatic use in expressions. Supports arithmetic with real numbers, TComplex numbers, and optionally with dimensional quantities (TQuantity / TComplexQuantity).

Overview

Methods

Public class operator *(const ALeft: double; const ARight: TImaginaryUnit): TComplex;
Public class operator *(const ALeft: TComplex; const ARight: TImaginaryUnit): TComplex;
Public class operator *(const ALeft: TImaginaryUnit; const ARight: double): TComplex;
Public class operator *(const ALeft: TImaginaryUnit; const ARight: TComplex): TComplex;
Public class operator *(const ALeft, ARight: TImaginaryUnit): double;
Public class operator *(const ALeft: TImaginaryUnit; const ARight: TQuantity): TComplexQuantity;
Public class operator *(const ALeft: TQuantity; const ARight: TImaginaryUnit): TComplexQuantity;
Public class operator +(const ALeft: double; const ARight: TImaginaryUnit): TComplex;
Public class operator +(const ALeft: TComplex; const ARight: TImaginaryUnit): TComplex;
Public class operator +(const AValue: TImaginaryUnit): TComplex;
Public class operator +(const ALeft: TImaginaryUnit; const ARight: double): TComplex;
Public class operator +(const ALeft: TImaginaryUnit; const ARight: TComplex): TComplex;
Public class operator -(const ALeft: double; const ARight: TImaginaryUnit): TComplex;
Public class operator -(const ALeft: TComplex; const ARight: TImaginaryUnit): TComplex;
Public class operator -(const AValue: TImaginaryUnit): TComplex;
Public class operator -(const ALeft: TImaginaryUnit; const ARight: double): TComplex;
Public class operator -(const ALeft: TImaginaryUnit; const ARight: TComplex): TComplex;
Public class operator /(const ALeft: double; const ARight: TImaginaryUnit): TComplex;
Public class operator /(const ALeft: TComplex; const ARight: TImaginaryUnit): TComplex;
Public class operator /(const ALeft: TImaginaryUnit; const ARight: double): TComplex;
Public class operator /(const ALeft: TImaginaryUnit; const ARight: TComplex): TComplex;
Public class operator /(const ALeft, ARight: TImaginaryUnit): double;
Public class operator /(const ALeft: TImaginaryUnit; const ARight: TQuantity): TComplexQuantity;
Public class operator /(const ALeft: TQuantity; const ARight: TImaginaryUnit): TComplexQuantity;
Public class operator :=(const ASelf: TImaginaryUnit): TComplex;

Description

Methods

Public class operator *(const ALeft: double; const ARight: TImaginaryUnit): TComplex;

Returns the product of a real number and the imaginary unit: a·i = 0 + ai.

Public class operator *(const ALeft: TComplex; const ARight: TImaginaryUnit): TComplex;

Returns the product of a complex number and the imaginary unit: (a+bi)·i = -b + ai.

Public class operator *(const ALeft: TImaginaryUnit; const ARight: double): TComplex;

Returns the product of the imaginary unit and a real number: i·a = 0 + ai.

Public class operator *(const ALeft: TImaginaryUnit; const ARight: TComplex): TComplex;

Returns the product of the imaginary unit and a complex number: i·(a+bi) = -b + ai.

Public class operator *(const ALeft, ARight: TImaginaryUnit): double;

Returns the product of the imaginary unit with itself: i·i = -1. The result is a plain double.

Public class operator *(const ALeft: TImaginaryUnit; const ARight: TQuantity): TComplexQuantity;

Returns the product of the imaginary unit and a dimensional quantity. The dimension is preserved.

Public class operator *(const ALeft: TQuantity; const ARight: TImaginaryUnit): TComplexQuantity;

Returns the product of a dimensional quantity and the imaginary unit. The dimension is preserved.

Public class operator +(const ALeft: double; const ARight: TImaginaryUnit): TComplex;

Returns the sum of a real number and the imaginary unit: a + i = a + 1·i.

Public class operator +(const ALeft: TComplex; const ARight: TImaginaryUnit): TComplex;

Returns the sum of a complex number and the imaginary unit: (a+bi) + i = a + (b+1)i.

Public class operator +(const AValue: TImaginaryUnit): TComplex;

Unary plus. Returns the imaginary unit as a TComplex number unchanged. Result: TComplex(Re=0, Im=1).

Public class operator +(const ALeft: TImaginaryUnit; const ARight: double): TComplex;

Returns the sum of the imaginary unit and a real number: i + a = a + 1·i.

Public class operator +(const ALeft: TImaginaryUnit; const ARight: TComplex): TComplex;

Returns the sum of the imaginary unit and a complex number: i + (a+bi) = a + (b+1)i.

Public class operator -(const ALeft: double; const ARight: TImaginaryUnit): TComplex;

Returns the difference of a real number and the imaginary unit: a - i = a - 1·i.

Public class operator -(const ALeft: TComplex; const ARight: TImaginaryUnit): TComplex;

Returns the difference of a complex number and the imaginary unit: (a+bi) - i = a + (b-1)i.

Public class operator -(const AValue: TImaginaryUnit): TComplex;

Unary minus. Returns the negation of the imaginary unit as a TComplex number. Result: TComplex(Re=0, Im=-1).

Public class operator -(const ALeft: TImaginaryUnit; const ARight: double): TComplex;

Returns the difference of the imaginary unit and a real number: i - a = -a + 1·i.

Public class operator -(const ALeft: TImaginaryUnit; const ARight: TComplex): TComplex;

Returns the difference of the imaginary unit and a complex number: i - (a+bi) = -a + (1-b)i.

Public class operator /(const ALeft: double; const ARight: TImaginaryUnit): TComplex;

Returns the quotient of a real number divided by the imaginary unit: a/i = 0 - ai.

Public class operator /(const ALeft: TComplex; const ARight: TImaginaryUnit): TComplex;

Returns the quotient of a complex number divided by the imaginary unit: (a+bi)/i = b - ai.

Public class operator /(const ALeft: TImaginaryUnit; const ARight: double): TComplex;

Returns the quotient of the imaginary unit divided by a real number: i/a = 0 + (1/a)i.

Public class operator /(const ALeft: TImaginaryUnit; const ARight: TComplex): TComplex;

Returns the quotient of the imaginary unit divided by a complex number: i/(a+bi) = b/(a²+b²) + (-a/(a²+b²))i.

Public class operator /(const ALeft, ARight: TImaginaryUnit): double;

Returns the quotient of the imaginary unit divided by itself: i/i = 1. The result is a plain double.

Public class operator /(const ALeft: TImaginaryUnit; const ARight: TQuantity): TComplexQuantity;

Returns the quotient of the imaginary unit divided by a dimensional quantity. The resulting dimension is the inverse of ARight.

Public class operator /(const ALeft: TQuantity; const ARight: TImaginaryUnit): TComplexQuantity;

Returns the quotient of a dimensional quantity divided by the imaginary unit. The dimension is preserved.

Public class operator :=(const ASelf: TImaginaryUnit): TComplex;

Implicit conversion of the imaginary unit to a TComplex number. Returns TComplex(Re=0, Im=1).


Generated by PasDoc 1.0.4.