複素数生成
Namespace: fvalgcliAssembly: fvalgcli (in fvalgcli.dll) Version: 3.1.0.0 (3.1.0.11)
Syntax
C# |
---|
public static FCOMPLEX fnFIE_fcomplex(
double r,
double i
) |
Visual Basic |
---|
Public Shared Function fnFIE_fcomplex (
r As Double,
i As Double
) As FCOMPLEX |
Parameters
- r
- Type: System..::..Double
実部
- i
- Type: System..::..Double
虚部
Return Value
Type:
FCOMPLEX複素数を生成して返します。
Remarks
Examples
C# | Copy |
---|
using System;
using System.Collections.Generic;
using System.Text;
using fvalgcli;
namespace TC
{
public partial class FIE
{
[FvPluginExecute]
public void fnFIE_fcomplex()
{
FCOMPLEX c1 = new FCOMPLEX();
c1 = api.fnFIE_fcomplex(1.1, 2.2);
Assert.IsTrue(compare(c1.real, 1.1, defs.DBL_EPS), "エラーが発生しました。(c1.real={0})", c1.real);
Assert.IsTrue(compare(c1.image, 2.2, defs.DBL_EPS), "エラーが発生しました。(c1.image={0})", c1.image);
ConsoleOut.WriteFunctionName(":\t");
Console.Write(" ...");
ConsoleOut.IsTrue(c1.real == 1.1 && c1.image == 2.2);
}
}
} |
Visual Basic | Copy |
---|
Imports System.Collections.Generic
Imports System.Text
Imports fvalgcli
Public Partial Class FIE
<FvPluginExecute> _
Public Sub fnFIE_fcomplex()
Dim c1 As New FCOMPLEX()
c1 = api.fnFIE_fcomplex(1.1, 2.2)
Assert.IsTrue(compare(c1.real, 1.1, defs.DBL_EPS), "エラーが発生しました。(c1.real={0})", c1.real)
Assert.IsTrue(compare(c1.image, 2.2, defs.DBL_EPS), "エラーが発生しました。(c1.image={0})", c1.image)
ConsoleOut.WriteFunctionName(":" & vbTab)
Console.Write(" ...")
ConsoleOut.IsTrue(c1.real = 1.1 AndAlso c1.image = 2.2)
End Sub
End Class |
See Also