mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps] Modular reimplementation of application models (stores and
ranges) and of curve views/curve view controllers. Change-Id: If4ca9bf1bec024917ef540a3fc7baefa8700f7ba
This commit is contained in:
33
apps/statistics/box_range.cpp
Normal file
33
apps/statistics/box_range.cpp
Normal file
@@ -0,0 +1,33 @@
|
||||
#include "box_range.h"
|
||||
|
||||
namespace Statistics {
|
||||
|
||||
BoxRange::BoxRange(Store * store) :
|
||||
m_store(store)
|
||||
{
|
||||
}
|
||||
|
||||
float BoxRange::xMin() {
|
||||
return m_store->minValue();
|
||||
}
|
||||
|
||||
float BoxRange::xMax() {
|
||||
if (m_store->minValue() >= m_store->maxValue()) {
|
||||
return m_store->minValue() + 1.0f;
|
||||
}
|
||||
return m_store->maxValue();
|
||||
}
|
||||
|
||||
float BoxRange::yMin() {
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
float BoxRange::yMax() {
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
float BoxRange::xGridUnit() {
|
||||
return computeGridUnit(Axis::X, xMin(), xMax());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user