3d math with C and SIMD intrinsics