math fix
Merge pull request #5 from NT7S/Thomas

math fix