Table of Contents

Method Dither

Namespace
Gamelogic.Extensions.Algorithms
Assembly
Gamelogic.Extensions.dll

Dither(IGenerator<float>, int, IEnumerable<float>)

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

public static IGenerator<int> Dither(this IGenerator<float> source, int levels, IEnumerable<float> errorFactors)

Parameters

source IGenerator<float>

The source.

levels int

The levels.

errorFactors IEnumerable<float>

The error factors.

Returns

IGenerator<int>

IGenerator<System.Int32>.