directxmath 2024.10.15.1

Requires NuGet 2.8.6 or higher.

dotnet add package directxmath --version 2024.10.15.1
NuGet\Install-Package directxmath -Version 2024.10.15.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version ofInstall-Package.
<PackageReference Include="directxmath" Version="2024.10.15.1" />
For projects that supportPackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="directxmath" Version="2024.10.15.1" />
Directory.Packages.props
<PackageReference Include="directxmath" />
Project file
For projects that supportCentral Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add directxmath --version 2024.10.15.1
The NuGet Team does not provide support for this client. Please contact itsmaintainers for support.
#r "nuget: directxmath, 2024.10.15.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package directxmath@2024.10.15.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=directxmath&version=2024.10.15.1
Install as a Cake Addin
#tool nuget:?package=directxmath&version=2024.10.15.1
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact itsmaintainers for support.

DirectX Logo

DirectXMath

https://github.com/Microsoft/DirectXMath

Copyright (c) Microsoft Corporation.

October 2024

This package contains the DirectXMath library, an all inline SIMD C++ linear algebra library for use in games and graphics apps.

This code is designed to build with Visual Studio 2019 (16.11), Visual Studio 2022, or clang/LLVM for Windows. It is recommended that you make use of the latest updates.

These components are designed to work without requiring any content from the legacy DirectX SDK. For details, seeWhere is the DirectX SDK?.

Directory Layout

  • Inc\

    • DirectXMath Files (in the DirectX C++ namespace)

      • DirectXMath.h - Core library
      • DirectXPackedVector.h - Load/Store functions and types for working with various compressed GPU formats
      • DirectXColors.h - .NET-style Color defines in sRGB and linear color space
      • DirectXCollision.h - Bounding volume collision library
  • Extentions\

    • Advanced instruction set variants for guarded codepaths

      • DirectXMathSSE3.h - SSE3
      • DirectXMathBE.h - Supplemental SSE3 (SSSE3)
      • DirectXMathSSE4.h - SSE4.1
      • DirectXMathAVX.h - Advanced Vector Extensions (AVX)
      • DirectXMathAVX2.h - Advanced Vector Extensions 2 (AVX2)
      • DirectXMathF16C.h - Half-precision conversions (F16C)
      • DirectXMathFMA3.h - Fused multiply-accumulate (FMA3)
      • DirectXMathFMA4.h - Fused multiply-accumulate (FMA4)
  • SHMath\

    • Spherical Harmonics math functions

      • DirectXSH.h - Header for SHMath functions
      • DirectXSH.cpp, DirectXSHD3D11.cpp, DirectXSHD3D12.cpp - Implementation
  • XDSP\

    • XDSP.h - Digital Signal Processing helper functions
  • build\

    • Contains YAML files for the build pipelines along with some miscellaneous build files and scripts.

Documentation

Documentation is available on theMicrosoft Docs. Additional information can be found on theproject wiki.

Compiler support

Officially the library is supported with Microsoft Visual C++ 2019 or later, clang/LLVM v12 or later, and GCC 9 or later. It should also compile with the Intel C++ and MinGW compilers.

When building with clang/LLVM or other GNU C compilers, the_XM_NO_XMVECTOR_OVERLOADS_ control define is set because these compilers do not support creating operator overloads for theXMVECTOR type. You can choose to enable this preprocessor define explicitly to do the same thing with Visual C++ for improved portability.

To build for non-Windows platforms, you need to provide asal.h header in your include path. You can obtain an open source version fromGitHub.

With GCC, the SAL annotation preprocessor symbols can conflict with the GNU implementation of the Standard C++ Library. The workaround is to include the system headers before including DirectXMath:

#include <algorithm>#include <utility>#include <DirectXMath.h>

Notices

All content and source code for this package are subject to the terms of theMIT License.

For the latest version of DirectXMath, bug reports, etc. please visit the project site onGitHub.

Release Notes

FOR SECURITY ADVISORIES, seeGitHub.

For a full change history, seeCHANGELOG.md.

  • The clang/LLVM toolset currently does not respect thefloat_control pragma for SSE instrinsics. Therefore, the use of/fp:fast is not recommended on clang/LLVM until this issue is fixed. See55713.

Support

For questions, consider usingStack Overflow with thedirectxmath tag, or theDirectX Discord Server in thedx12-developers ordx9-dx11-developers channel.

For bug reports and feature requests, please use GitHubissues for this project.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visithttps://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

Tests for new features should also be submitted as a PR to theTest Suite repository.

Code of Conduct

This project has adopted theMicrosoft Open Source Code of Conduct. For more information see theCode of Conduct FAQ or contactopencode@microsoft.com with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must followMicrosoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Credits

The xboxmath library was originated by Matt Bronder with contributions from Sakphong Chanbai and David Hefner for the Xbox 360.

The xnamath library for the DirectX SDK and Xbox XDK was the work of Chuck Walbourn and Becky Heineman based on xboxmath, with contributions from Jeremy Gup, Dan Haffner, Matt Lee, Casey Meekhof, Rich Sauer, Jason Strayer, and Xiaoyue Zheng.

The DirectXMath library for the Windows SDK and Xbox One XDK is the work of Chuck Walbourn based on xnamath, with contributions from Darren Anderson, Matt Lee, Aaron Rodriguez Hernandez, Yuichi Ito, Reza Nourai, Rich Sauer, and Jason Strayer.

Thanks to Dave Eberly for his contributions particularly in improving the transcendental functions.

Thanks to Bruce Dawson for his help with the rounding functions.

Thanks to Andrew Farrier for the fixes toXMVerifyCPUSupport to properly support clang.

Thanks to Scott Matloff for his help in getting the library updated to use Intel SVML for VS 2019.

ProductCompatible and additional computed target framework versions.
nativenative is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more aboutTarget Frameworks and.NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

VersionDownloads Last Updated
2024.10.15.1 17,53110/15/2024
2024.2.15.1 33,0432/15/2024
2024.1.1.1 5391/1/2024
2022.12.12.1 56,80012/13/2022
2022.5.18.1 1,6175/18/2022
2022.2.11.1 1,0582/28/2022
2021.1.11.2 34,0881/11/2021
2020.12.19.1 77412/19/2020
2020.4.23.1 24,8574/24/2020
2019.8.23.1 1,1158/23/2019
2018.7.23.2 1,7597/23/2018

Matches the February 2024 release.

Downloads
Total214.2K
Current version17.5K
Per day average67
About
Owners

C++nativeDirectXmathnativepackage

© Microsoft Corporation. All rights reserved.

Share this package on FacebookShare this package on XUse the Atom feed to subscribe to new versions of directxmath