C# Complex Negate

Description

Complex Negate Returns the additive inverse of a specified complex number.

Syntax

Complex.Negate has the following syntax.


public static Complex Negate(
  Complex value
)

Parameters

Complex.Negate has the following parameters.

  • value - A complex number.

Returns

Complex.Negate method returns The result of the Real and Imaginary components of the value parameter multiplied by -1.

Example


using System;// www  .j  a  v  a2s.  c  o m
using System.Numerics;

public class Example
{
   public static void Main()
   {
      Complex[] values= { Complex.One, 
                          new Complex(-3.3, -1.8) };
      foreach (Complex c1 in values)
         Console.WriteLine("{0} --> {1}", c1, Complex.Negate(c1));
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Numerics »




BigInteger
Complex