Returns the additive inverse of a specified complex number. : Complex « Data Types « C# / C Sharp

Home
C# / C Sharp
1.2D Graphics
2.Class Interface
3.Collections Data Structure
4.Components
5.Data Types
6.Database ADO.net
7.Date Time
8.Design Patterns
9.Development Class
10.Event
11.File Stream
12.Generics
13.GUI Windows Form
14.Internationalization I18N
15.Language Basics
16.LINQ
17.Network
18.Office
19.Reflection
20.Regular Expressions
21.Security
22.Services Event
23.Thread
24.Web Services
25.Windows
26.Windows Presentation Foundation
27.XML
28.XML LINQ
C# / C Sharp » Data Types » ComplexScreenshots 
Returns the additive inverse of a specified complex number.
 

using System;
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));
   }
}

   
  
Related examples in the same category
1.A Complex Number ClassA Complex Number Class
2.Complex number class
3.Class to do math on complex numbers.
4.Initializes a new instance of the Complex structure using the specified real and imaginary values.
5.Complex Structure represents a complex number.
6.Assign a Double to a complex number
7.Cast a Decimal to a complex number
8.Assign the return value of a method to a Complex variable
9.Assign the value returned by an operator to a Complex variable
10.Instantiate a complex number from its polar coordinates
11.Complex.Exp
12.Complex.Sqrt
13.Divide and multiply
14.Gets the absolute value (or magnitude) of a complex number.
15.Returns the angle that is the arc cosine of the specified complex number.
16.Adds two complex numbers and returns the result.
17.Adds two complex numbers.
18.Returns the angle that is the arc sine of the specified complex number.
19.Returns the angle that is the arc tangent of the specified complex number.
20.Computes the conjugate of a complex number and returns the result.
21.Divides one complex number by another and returns the result.
22.Returns a value that indicates whether the current instance and a specified complex number have the same value.
23.Returns e raised to the power specified by a complex number.
24.Creates a complex number from a point's polar coordinates.
25.Gets the imaginary component of the current Complex object.
26.Returns a new Complex instance with a real number equal to zero and an imaginary number equal to one.
27.Returns the product of two complex numbers.
28.Returns a new Complex instance with a real number equal to one and an imaginary number equal to zero.
29.Returns a specified complex number raised to a power specified by a double-precision floating-point number.
30.Returns the multiplicative inverse of a complex number.
31.Subtracts one complex number from another and returns the result.
32.Converts current complex number to string in Cartesian form by using the specified culture-specific formatting information.
33.Converts current complex number to string in Cartesian form by using the specified format for its real and imaginary parts.
34.Converts complex number to string representation in Cartesian form by using the specified format and culture-specific format information for its real and imaginary parts.
35.Converts the value of the current complex number to its equivalent string representation in Cartesian form.
36.Returns a new Complex instance with a real number equal to zero and an imaginary number equal to zero.
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.