Click or drag to resize

GeneratorDither Method

Takes the source generator's output, and generate a dithered sequence of integers in the range 0 to levels - 1. Uses error diffusion.

Namespace:  Gamelogic.Extensions.Algorithms
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public static IGenerator<int> Dither(
	this IGenerator<float> source,
	int levels,
	IEnumerable<float> errorFactors
)

Parameters

source
Type: Gamelogic.Extensions.AlgorithmsIGeneratorSingle
The source.
levels
Type: SystemInt32
The levels.
errorFactors
Type: System.Collections.GenericIEnumerableSingle
The error factors.

Return Value

Type: IGeneratorInt32
IGenerator<System.Int32>.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IGeneratorSingle. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also