AVALANCHE: Use floats instead of double. Use M_PI where it is possible.