moved platform stuff to math.h