Apply Srdjan's patch
Fix typo
Merge pull request #28 from johnmccutchan/master

s/num/double