Adding code for a lot of simple math functions. I think the convex function should work using the Grahm Scan method. I might add some documentation later.