Complex.UnaryNegation(Complex) Operador

Definição

Retorna o inverso aditivo de um número complexo especificado.Returns the additive inverse of a specified complex number.

public:
 static System::Numerics::Complex operator -(System::Numerics::Complex value);
public static System.Numerics.Complex operator - (System.Numerics.Complex value);
static member ( ~- ) : System.Numerics.Complex -> System.Numerics.Complex
Public Shared Operator - (value As Complex) As Complex

Parâmetros

value
Complex

O valor a ser negado.The value to negate.

Retornos

Complex

O resultado dos componentes Real e Imaginary do parâmetro value multiplicado por -1.The result of the Real and Imaginary components of the value parameter multiplied by -1.

Comentários

O UnaryNegation método define a operação do operador de negação unário (inverso de aditivo) para números complexos.The UnaryNegation method defines the operation of the unary negation (additive inverse) operator for complex numbers. Ele permite que o código seja o seguinte:It enables code such as the following:

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

O número complexo resultante produz um valor de Zero quando ele é adicionado ao número complexo original.The resulting complex number produces a value of Zero when it is added to the original complex number. Linguagens que não dão suporte a operadores personalizados podem chamar o método Negate em vez disso.Languages that do not support custom operators can call the Negate method instead.

O método equivalente para esse operador é Complex.Negate(Complex)The equivalent method for this operator is Complex.Negate(Complex)

Aplica-se a

Confira também