Complex.UnaryNegation Operator
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Returns the additive inverse of a specified complex number.
Namespace: System.Numerics
Assembly: System.Numerics (in System.Numerics.dll)
Syntax
'Declaration
Public Shared Operator - ( _
value As Complex _
) As Complex
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.
Remarks
The UnaryNegation method defines the operation of the unary negation (additive inverse) operator for complex numbers. It enables code such as the following:
Dim c1 As New Complex(1.7, 3.9)
Dim c2 As Complex = -c1
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.
Version Information
Silverlight
Supported in: 5, 4
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.