擬似一様乱数を生成します
Namespace: fvalgcliAssembly: fvalgcli (in fvalgcli.dll) Version: 3.1.0.0 (3.1.0.11)
Syntax
C# |
---|
public static uint fnFIE_mtrand(
ref F_RANDDESC r
) |
Visual Basic |
---|
Public Shared Function fnFIE_mtrand (
ByRef r As F_RANDDESC
) As UInteger |
Return Value
Type:
UInt32
擬似一様乱数:[0,0xffffffff]区間内の整数を返します。
Examples
C# | Copy |
---|
using System;
using System.Collections.Generic;
using System.Text;
using fvalgcli;
namespace TC
{
public partial class FIE
{
[FvPluginExecute]
public void fnFIE_mtrand()
{
uint seed = 11111;
F_RANDDESC r = new F_RANDDESC();
uint random = 100;
api.fnFIE_mtrand_init(seed, ref r);
ConsoleOut.WriteFunctionName(":\n");
for (int i = 0; i < 5; i++)
{
random = api.fnFIE_mtrand(ref r);
Console.WriteLine("random = {0}", random);
}
Console.Write(" ...");
ConsoleOut.IsTrue(random != 100);
}
}
} |
Visual Basic | Copy |
---|
Imports System.Collections.Generic
Imports System.Text
Imports fvalgcli
Public Partial Class FIE
<FvPluginExecute> _
Public Sub fnFIE_mtrand()
Dim seed As UInteger = 11111
Dim r As New F_RANDDESC()
Dim random As UInteger = 100
api.fnFIE_mtrand_init(seed, r)
ConsoleOut.WriteFunctionName(":" & vbLf)
For i As Integer = 0 To 4
random = api.fnFIE_mtrand(r)
Console.WriteLine("random = {0}", random)
Next
Console.Write(" ...")
ConsoleOut.IsTrue(random <> 100)
End Sub
End Class |
See Also