overhauled to use DirectXMath instead of xnamath