This would probably be better when placed in function, like it is in the other modules that use the same math.