Math toolkit for real-time programming