abpetkov/powerange — pull request #13 by cristiandouce (2014-11-26 23:09:10+00:00)
Title: Fix issue when min =! 0 and start = max showing wrong initial step

When using a config like the following:

```js

var range = new Powerange(el, {
min: 1,
max: 3,
start: 3
})

```

The slider will init in the 2nd step instead of the last one.

This is caused because of the following steps iteration:

```js
// main.js:200
for (i = 0; i <= dimension; i += interval) {
// ...
```

The issue here is that when working with decimal numbers, in javascript `0.1 + 0.2 != 0.3` ever!

So, the `<=` evaluation never reaches the `=` part and therefore in those scenarios the `this.steps` array always ends up with less steps than it should have.

The solution I found is replacing the `<=` for a strict `<` and the top most `dimension + 1` leading to this iteration:

```js
// main.js:200
for (i = 0; i < dimension + 1; i += interval) {
// ...
```

Working for both integer and decimal iterations!

And of course filling the `this.steps` array with the correct amount of steps.

Let me know what you think of this.