本文整理汇总了VB.NET中System.Numerics.Complex.Complex构造函数的典型用法代码示例。如果您正苦于以下问题:VB.NET Complex构造函数的具体用法?VB.NET Complex怎么用?VB.NET Complex使用的例子?那么, 这里精选的构造函数代码示例或许可以为您提供帮助。您也可以进一步了解该构造函数所在类System.Numerics.Complex
的用法示例。
在下文中一共展示了Complex构造函数的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: Example
' 导入命名空间
Imports System.Numerics
Module Example
Public Sub Main()
Dim complex1 As New Complex(17.34, 12.87)
Dim Complex2 As New Complex(8.76, 5.19)
Console.WriteLine("{0} + {1} = {2}", complex1, complex2,
complex1 + complex2)
Console.WriteLine("{0} - {1} = {2}", complex1, complex2,
complex1 - complex2)
Console.WriteLine("{0} * {1} = {2}", complex1, complex2,
complex1 * complex2)
Console.WriteLine("{0} / {1} = {2}", complex1, complex2,
complex1 / complex2)
End Sub
End Module
输出:
(17.34, 12.87) + (8.76, 5.19) = (26.1, 18.06) (17.34, 12.87) - (8.76, 5.19) = (8.58, 7.68) (17.34, 12.87) * (8.76, 5.19) = (85.1031, 202.7358) (17.34, 12.87) / (8.76, 5.19) = (2.10944241403558, 0.219405693054265)