mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-23 15:50:49 +01:00
[apps/graphs] Modify how functions are handled by the function store
Change-Id: I0d7a989526440a3b6d6a925b30d0d8742017e3f9
This commit is contained in:
@@ -16,9 +16,16 @@ Graph::Function * Graph::FunctionStore::functionAtIndex(int i) {
|
||||
return &m_functions[i];
|
||||
}
|
||||
|
||||
void Graph::FunctionStore::addFunction(Function * f) {
|
||||
Graph::Function * Graph::FunctionStore::addEmptyFunction() {
|
||||
assert(m_numberOfFunctions < k_maxNumberOfFunctions);
|
||||
m_functions[m_numberOfFunctions++] = (*f);
|
||||
Graph::Function addedFunction = Function();
|
||||
addedFunction.setColor(defaultColors[numberOfFunctions()%numberOfDefaultColors]);
|
||||
addedFunction.setName("f(x)");
|
||||
addedFunction.setActive(true);
|
||||
m_functions[m_numberOfFunctions] = addedFunction;
|
||||
Function * result = &m_functions[m_numberOfFunctions];
|
||||
m_numberOfFunctions++;
|
||||
return result;
|
||||
}
|
||||
|
||||
void Graph::FunctionStore::removeFunction(Function * f) {
|
||||
|
||||
Reference in New Issue
Block a user