Added distance method to Vector2d class.