当前位置: 首页>>代码示例>>C#>>正文


C# Complex.Tan方法代码示例

本文整理汇总了C#中Complex.Tan方法的典型用法代码示例。如果您正苦于以下问题:C# Complex.Tan方法的具体用法?C# Complex.Tan怎么用?C# Complex.Tan使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Complex的用法示例。


在下文中一共展示了Complex.Tan方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Run

        public void Run()
        {
            var a = new Complex(5.0, 6.0);
            var b = new Complex(-3.0, 4.0);

            Console.WriteLine("a            = " + a);
            Console.WriteLine("b            = " + b);
            Console.WriteLine("Re(a)        = " + a.Re());
            Console.WriteLine("Im(a)        = " + a.Im());
            Console.WriteLine("b + a        = " + b.Plus(a));
            Console.WriteLine("a - b        = " + a.Minus(b));
            Console.WriteLine("a * b        = " + a.Times(b));
            Console.WriteLine("b * a        = " + b.Times(a));
            Console.WriteLine("a / b        = " + a.Divides(b));
            Console.WriteLine("(a / b) * b  = " + a.Divides(b).Times(b));
            Console.WriteLine("conj(a)      = " + a.Conjugate());
            Console.WriteLine("|a|          = " + a.Abs());
            Console.WriteLine("tan(a)       = " + a.Tan());

            Console.ReadLine();
        }
开发者ID:vladdnc,项目名称:Algorithms-NET,代码行数:21,代码来源:ComplexWorker.cs

示例2: test

        // sample client for testing
        public static void test()
        {
            Complex a = new Complex(5.0, 6.0);
            Complex b = new Complex(-3.0, 4.0);

            System.Diagnostics.Debug.WriteLine("a            = " + a);
            System.Diagnostics.Debug.WriteLine("b            = " + b);
            System.Diagnostics.Debug.WriteLine("Re(a)        = " + a.Re);
            System.Diagnostics.Debug.WriteLine("Im(a)        = " + a.Im);
            System.Diagnostics.Debug.WriteLine("b + a        = " + b.Plus(a));
            System.Diagnostics.Debug.WriteLine("a - b        = " + a.Minus(b));
            System.Diagnostics.Debug.WriteLine("a * b        = " + a.Times(b));
            System.Diagnostics.Debug.WriteLine("b * a        = " + b.Times(a));
            System.Diagnostics.Debug.WriteLine("a / b        = " + a.Divides(b));
            System.Diagnostics.Debug.WriteLine("(a / b) * b  = " + a.Divides(b).Times(b));
            System.Diagnostics.Debug.WriteLine("conj(a)      = " + a.Conjugate());
            System.Diagnostics.Debug.WriteLine("|a|          = " + a.Abs());
            System.Diagnostics.Debug.WriteLine("tan(a)       = " + a.Tan());
        }
开发者ID:remy22,项目名称:AudioVSTToolbox,代码行数:20,代码来源:Complex.cs


注:本文中的Complex.Tan方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。