Add deconstructors for vector types
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- csharp
- Domain
- computer-graphics
Research direction
Start by locating the vector type definitions in the C# library and reviewing how their x, y, and z components are exposed. Check all relevant vector dimensions and existing tests or usage examples; done means the supported vector types can be assigned with C# deconstruction syntax without the repeated component-access code shown in the issue.
Written by the indexing model from the issue text.
Description
It would be nice if the vector types had built-in deconstructors. So that we could write
var (x, y, z) = properlyNamedVectorVariable;
instead of verbose and error-prone
var x = properlyNamedVectorVariable.x;
var y = properlyNamedVectorVariable.y;
var z = properlyNamedVectorVariable.z;
or
var (x, y, z) = (properlyNamedVectorVariable.x, properlyNamedVectorVariable.y, properlyNamedVectorVariable.z);
- Dominant language
- C#
- Stars
- 1.4k
- Forks
- 159
- PR merge metrics
- No merged PRs in 30d
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.
More from Unity-Technologies/Unity.Mathematics
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Unity-Technologies/Unity.Mathematics#245 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
Unity-Technologies/Unity.Mathematics#243 · 6 reactions ·
All issues in Unity-Technologies/Unity.Mathematics
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Type: enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
apache/arrow-adbc#4809 ·
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
microsoft/vscode-azurefunctions#5197 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
microsoft/microsoft-ui-reactor#1274 ·