Corrected Midpoint code

line 278, 289 are now /2 instead of /6
Merge pull request #5 from O11o1/patch-7

Corrected Midpoint code