Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
Variable() {
v = new TreeMap<Integer, Double>();
- fill();
+ fill(-5.0, 5.0, 0.25);
}
- private void fill() {
+ /**
+ * Fill the variable with a discret set of double values
+ * @param start starting double value
+ * @param end ending double value
+ * @param step looping step
+ */
+ private void fill(double start, double end, double step) {
int i = 0;
- for (double d = -5.0; d <= 5.0; d = d + 0.25) {
+ for (double d = start; d <= end; d = d + step) {
v.put(i, d);
i++;
}