UnityGame/Library/PackageCache/com.unity.mathematics/Documentation~/index.md
2024-10-27 10:53:47 +03:00

28 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Unity Mathematics
Unity Mathematics is a C# math library that provides vector types and math functions that have a shader-like
syntax, similar to [SIMD](https://en.wikipedia.org/wiki/Single_instruction,_multiple_data) or [HLSL](https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl). The [Burst compiler](https://docs.unity3d.com/Packages/com.unity.burst@latest) uses Unity Mathematics to compile C#/IL code into highly efficient native code.
It implements the following vector and matrix types:
* floatN, quaternion
* float3×3, float4×4
Plus elementary functions:
* min, max, fabs, etc.
* sin, cos, sqrt, normalize, dot, cross, etc.
## Installation
You can install the Mathematics package through Unity's Package Manager. For more information, see the Unity User Manual documentation on [Adding and removing packages](https://docs.unity3d.com/Manual/upm-ui-actions.html).
### Editor config
Unity Mathematics uses [editorconfig](http://editorconfig.org/) to keep files formatted for EOL and spaces.
Your IDE should have support for `editorconfig`. If it doesn't, you can get the extension for it here:
* [VS2015/VS2017 EditorConfig extension](https://marketplace.visualstudio.com/items?itemName=EditorConfigTeam.EditorConfig)
* [Visual Studio Code EditorConfig extension](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig)
* [SublimeText EditorConfig extension](https://github.com/sindresorhus/editorconfig-sublime)