math helper's declared inlined static, added some geometry