These should probably be in a math library/header.