Numworks Epsilon  1.4.1
Graphing Calculator Operating System
box_range.cpp
Go to the documentation of this file.
1 #include "box_range.h"
2 
3 namespace Statistics {
4 
6  m_store(store)
7 {
8 }
9 
10 float BoxRange::xMin() {
11  float min = m_store->minValue();
12  float max = m_store->maxValue();
13  max = min >= max ? min + 1 : max;
14  return min - k_displayLeftMarginRatio*(max-min);
15 }
16 
17 float BoxRange::xMax() {
18  float min = m_store->minValue();
19  float max = m_store->maxValue();
20  max = min >= max ? min + 1 : max;
21  return max + k_displayRightMarginRatio*(max - min);
22 }
23 
24 float BoxRange::yMin() {
25  return -k_displayBottomMarginRatio;
26 }
27 
28 float BoxRange::yMax() {
29  return 1.0f+k_displayTopMarginRatio;
30 }
31 
33  return computeGridUnit(Axis::X, xMin(), xMax());
34 }
35 
36 }
BoxRange(Store *store)
Definition: box_range.cpp:5
double maxValue()
Definition: store.cpp:98
float xGridUnit() override
Definition: box_range.cpp:32
double minValue()
Definition: store.cpp:108
float xMax() override
Definition: box_range.cpp:17
float xMin() override
Definition: box_range.cpp:10
float computeGridUnit(Axis axis, float min, float max)
float yMax() override
Definition: box_range.cpp:28
float yMin() override
Definition: box_range.cpp:24