Interval() stuff and getDistance function

- added Interval() constructor
- added Math.getDistance()