A couple more functions to physics.c