Added a new draw line function

Added a new function copied from wikipedia which is much more elegant
than my own one