Table of Contents

Class ResponseCurve

Namespace
Gamelogic.Extensions.Algorithms
Assembly
Assembly-CSharp.dll

Contains extension methods for Response curves.

public static class ResponseCurve
Inheritance
ResponseCurve
Inherited Members

Methods

Select<TSource, TResult>(IResponseCurve<TSource>, Func<TSource, TResult>)

Creates a response curve that transforms the output of the given curve using the given function.

public static IResponseCurve<TResult> Select<TSource, TResult>(this IResponseCurve<TSource> source, Func<TSource, TResult> selector)

Parameters

source IResponseCurve<TSource>

The source curve.

selector Func<TSource, TResult>

The selector used to transform results from the source curve.

Returns

IResponseCurve<TResult>

IResponseCurve<TResult>.

Type Parameters

TSource

The type of the source response curve.

TResult

The type of the result response curve.

Examples

The following makes a response curve that returns string representation of the results of a float response curve:

var curve = new ResponseCurveFloat(new[] {0f, 0.5f, 1f}, new []{0f, 1f, 10f}).Select(x => x.TosString());
uiComponent.text = (curve[0.75f]);