Files
Upsilon/apps/statistics/box_range.cpp
Émilie Feral affda5eae9 [apps] Modular reimplementation of application models (stores and
ranges) and of curve views/curve view controllers.

Change-Id: If4ca9bf1bec024917ef540a3fc7baefa8700f7ba
2017-01-10 13:35:19 +01:00

34 lines
489 B
C++

#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());
}
}