Skip to content

Latest commit

 

History

History
139 lines (121 loc) · 7.52 KB

d3d10-graphics-reference-d3dx10-functions-math.md

File metadata and controls

139 lines (121 loc) · 7.52 KB
description ms.assetid title ms.topic ms.date
Learn about the math library provided by the D3DX utility library in Direct3D 10 Graphics. The library supplies functions to compute 3D mathematical operations.
6e180c12-8cbe-4013-8bb4-3ac5bb9c65f1
Math Functions (Direct3D 10 Graphics)
article
05/31/2018

Math Functions (Direct3D 10 Graphics)

Note

The D3DX10 utility library is deprecated. We recommend that you use DirectXMath instead.

 

The math library provided by the D3DX utility library supplies functions to compute 3D mathematical operations. Each of the functions can take the same object as the passed [in] and returned [out] parameters. Also, out parameters are typically returned as return values, so that the output of one math function can be used as a parameter for another math function.

Resolving Link Errors with D3DX Math Functions

The D3DX math functions are implemented identically in D3DX10 (D3DX10math.h) and D3DX9 (D3DX9math.h). This can cause link errors if a project implements both DirectX 9 and DirectX 10 code, and attempts to link a function from one header with the opposite library.

To eliminate the problem of including both headers, D3DX10math.h includes the following #define:

#ifndef __D3DX9MATH_H__
#define __D3DX9MATH_H__

To eliminate possible link errors, the DX SDK samples link to D3DX9 libraries first (D3DX9d.lib and D3DX9.lib) and then the D3DX10 libraries second (D3DX10d.lib and D3DX10.lib). These settings are under Project/Properties if you are using Visual Studio.

Related topics

D3DX Functions