Show / Hide Table of Contents

Class RandomSampleData

Basically this class caches the results gotten from an instance of the Random class. It's used to get the same set of pseudo-random data each time range is called, without having to create a new instance of Random each time.

This is used in the NoiseSampleProvider to ensure that the same sample set sounds te same each time. NoiseSampleProvider

Inheritance
System.Object
RandomSampleData
Namespace: InsaneScatterbrain.RetroKit.Editor
Syntax
public static class RandomSampleData

Methods

Range(Int32, Single, Single)

Returns a random number for a certain index. If the index has been used before, it returns the same value it generated earlier.

Declaration
public static float Range(int index, float min = 0F, float max = 1F)
Parameters
Type Name Description
System.Int32 index

The index.

System.Single min

The minimum value for the random range.

System.Single max

The maximum value for the random range.

Returns
Type Description
System.Single

The random value.

Back to top Generated by DocFX