resonance
1.0.1
Loading...
Searching...
No Matches
lineartransform.h
Go to the documentation of this file.
1
#pragma once
2
11
class
LinearTransform
{
12
public
:
21
LinearTransform
(
int
nInMin,
int
nInMax,
int
nOutMin,
int
nOutMax)
22
: mInMin(nInMin), mInMax(nInMax), mOutMin(nOutMin), mOutMax(nOutMax) {
23
Recalc();
24
}
25
34
int
Apply
(
int
nValue);
35
36
private
:
44
void
Recalc();
45
46
int
mInMin;
// +0x00
47
int
mInMax;
// +0x04
48
int
mOutMin;
// +0x08
49
int
mOutMax;
// +0x0c
50
int
mUpper;
// +0x10, the larger output end
51
int
mLower;
// +0x14, the smaller output end
52
float
mSlope;
// +0x18
53
float
mOffset;
// +0x1c
54
};
LinearTransform::LinearTransform
LinearTransform(int nInMin, int nInMax, int nOutMin, int nOutMax)
Map inMin onto outMin and inMax onto outMax.
Definition
lineartransform.h:21
LinearTransform::Apply
int Apply(int nValue)
Map a value, truncating toward zero and clamping to the output range.
src
game
lineartransform.h
Generated by
1.15.0