Complex.UnaryNegation Operator

Returns the additive inverse of a specified complex number.

Namespace:  System.Numerics
Assembly:  System.Numerics (in System.Numerics.dll)

public static Complex operator -(
	Complex value
)

Parameters

value
Type: System.Numerics.Complex
The value to negate.

Return Value

Type: System.Numerics.Complex
The result of the Real and Imaginary components of the value parameter multiplied by -1.

The UnaryNegation method defines the operation of the unary negation (additive inverse) operator for complex numbers. It enables code such as the following:


Complex c1 = new Complex(1.7, 3.9);
Complex c2 = -c1;


The resulting complex number produces a value of Zero 0 (zero) when it is added to the original complex number. Languages that do not support custom operators can call the Negate method instead.

Silverlight

Supported in: 5, 4

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show: