Table of Contents

Method ClosedSawTooth

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

ClosedSawTooth(int)

Makes a generator that produces evenly spaced floats from 0 to 1, both limits included, and repeats the result.

public static IGenerator<float> ClosedSawTooth(int sampleCount)

Parameters

sampleCount int

The number of samples per cycle.

Returns

IGenerator<float>

A new generator.

Remarks

This generator is designed to be used with Select<TSource, TResult>(IGenerator<TSource>, Func<TSource, TResult>) to generate outputs of periodic functions.

Exceptions

ArgumentOutOfRangeException

sampleCountis not bigger than 1.

See Also