MCPcopy
hub / github.com/arduino/Arduino / add

Method add

app/src/processing/app/helpers/CircularBuffer.java:12–18  ·  view source on GitHub ↗
(double num)

Source from the content-addressed store, hash-verified

10 private final int capacity;
11
12 public void add(double num) {
13 end = (end + 1) % capacity;
14 elements[end] = num;
15 if (start == end || start == -1) {
16 start = (start + 1) % capacity;
17 }
18 }
19
20 public double get(int index) {
21 if (index >= capacity) {

Callers 3

refreshMenuMethod · 0.45
restoreMenuItemsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected