All of the operators now set the resultant phasor's number of display digits to the minimum of the number used by the operands.

Operator: +

This operator overloads the add method and returns a new phasor that is the sum of the two operand phasors.

Operator: -

This operator overloads the subtraction method and returns a new phasor that is the difference of the two operand phasors.

Operator: *

This operator overloads the multiplication method and returns a new phasor. There are three forms of this operator.
  1. phasor * phasor. This multiplies the phasors together and returns the new phasor.
  2. double * phasor. This multiplies the phasor magnitude to double value and returns the new phasor. Scales the magnitude.
  3. phasor * double. This multiplies the phasor magnitude to double value and returns the new phasor. Scales the magnitude.

Operator: /

This operator overloads the division method and returns a new phasor. There are two forms of this operator.
  1. phasor / phasor. This divides the phasors and returns the new phasor.
  2. phasor / double. This divides the phasor magnitude by the double value and returns the new phasor. Scales the magnitude.

Operator: == and !=

These operators overload the equality operators. Returns true or false if the phasors are equal or not equal depending on operator used.

public override bool Equals(object o)

Overrides the Equals method. Compares to different objects.

Last edited Apr 29, 2011 at 2:14 AM by Justinius, version 2

Comments

No comments yet.