Unity-Technologies / Unity-Technologies/Unity.Mathematics
Add math.diag
Open
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 1.4k
- Forks
- 159
- PR merge metrics
- No merged PRs in 30d
Description
It'll be great to be able to do the following:
float2 scale = float2(2f, 3f);
float2x2 transform = diag(scale);
// Yields:
// 2f 0f
// 0f 3f
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue provides a C# example using float2 and float2x2 but names no implementation file or test. Start by locating existing matrix and vector math functions in Unity.Mathematics and their tests. Done means a diag operation accepts the shown float2 input and produces the illustrated 2x2 diagonal matrix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, unity
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100