Average of the rate of the gems of one bar.
More...
#include <rateaverager.h>
|
| | RateAverager (int nTicksPerBar) |
| | Construct an average with no samples.
|
| void | Reset () |
| | Forget every sample.
|
| void | Sample (int nSlot, int nTick) |
| | Add a gem.
|
| float | GetMean () const |
| | Report the average rate.
|
| float | GetSum () const |
Average of the rate of the gems of one bar.
The class is not polymorphic and has no RTTI. The name is inferred. Each sample after the first adds the length of a bar divided by the ticks since the previous sample.
◆ RateAverager()
| RateAverager::RateAverager |
( |
int | nTicksPerBar | ) |
|
|
explicit |
Construct an average with no samples.
- Parameters
-
| nTicksPerBar | The length of a bar in ticks. |
- Ghidra address:
- NTSC-U/C: 0x0014a8b0
- Ghidra address:
- PAL: 0x0014c270
◆ Reset()
| void RateAverager::Reset |
( |
| ) |
|
Forget every sample.
- Ghidra address:
- NTSC-U/C: 0x0014a8e0
- Ghidra address:
- PAL: 0x0014c2a0
◆ Sample()
| void RateAverager::Sample |
( |
int | nSlot, |
|
|
int | nTick ) |
Add a gem.
- Parameters
-
| nSlot | The slot of the gem. The body does not read it. |
| nTick | The tick of the gem. |
- Ghidra address:
- NTSC-U/C: 0x0014a8f8
- Ghidra address:
- PAL: 0x0014c2b8
◆ GetMean()
| float RateAverager::GetMean |
( |
| ) |
const |
Report the average rate.
- Returns
- The sum of the rates over the number of samples.
- Ghidra address:
- NTSC-U/C: 0x0014a948
- Ghidra address:
- PAL: 0x0014c308
◆ GetSum()
| float RateAverager::GetSum |
( |
| ) |
const |
|
inline |
- Returns
- The sum of the rates.
The documentation for this class was generated from the following file: