Adopted XNA Math and floating point.