C and Objective C math and geometry helpers