mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
25 lines
326 B
C
25 lines
326 B
C
#pragma once
|
|
|
|
typedef enum
|
|
{
|
|
Step,
|
|
Linear,
|
|
Polynomial,
|
|
Logistic,
|
|
Logit
|
|
} ResponseCurveType;
|
|
|
|
struct ResponseCurve
|
|
{
|
|
ResponseCurveType type;
|
|
float m;
|
|
float k;
|
|
float b;
|
|
float c;
|
|
float min;
|
|
float max;
|
|
};
|
|
|
|
float NormalizeInput(float value, float min, float max);
|
|
float CalculateResponse(float x, ResponseCurve curve);
|