Files
Upsilon/apps/statistics/box_window.cpp
Émilie Feral 3c3a900bb7 [apps/statistics] Handle the edge case with only one pair of value and
size

Change-Id: I812ffea48b7a06d0646d044aacd811c48fa95d9e
2017-01-09 15:08:54 +01:00

34 lines
488 B
C++

#include "box_window.h"
namespace Statistics {
BoxWindow::BoxWindow(Data * data) :
m_data(data)
{
}
float BoxWindow::xMin() {
return m_data->minValue();
}
float BoxWindow::xMax() {
if (m_data->minValue() >= m_data->maxValue()) {
return m_data->minValue() + 1.0f;
}
return m_data->maxValue();
}
float BoxWindow::yMin() {
return 0.0f;
}
float BoxWindow::yMax() {
return 1.0f;
}
float BoxWindow::xGridUnit() {
return computeGridUnit(Axis::X, xMin(), xMax());
}
}