MCPcopy Create free account
hub / github.com/clementgallet/libTAS / AddPoint

Method AddPoint

src/library/renderhud/UnityDebug.cpp:40–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40void UnityDebug::ScrollingBuffer::AddPoint(int x, int y) {
41 if (DataX.size() < MaxSize) {
42 DataX.push_back(x);
43 DataY.push_back(y);
44 }
45 else {
46 DataX[Offset] = x;
47 DataY[Offset] = y;
48 Offset = (Offset + 1) % MaxSize;
49 }
50}
51void UnityDebug::ScrollingBuffer::Erase() {
52 if (DataX.size() > 0) {
53 DataX.clear();

Callers 1

updateMethod · 0.80

Calls 3

sizeMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected