Unity-Technologies / Unity-Technologies/Unity.Mathematics
math.up() / math.forward() / etc. methods should be properties
Open
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 1.4k
- Forks
- 159
- PR merge metrics
- No merged PRs in 30d
Description
Currently the cardinal axes are defined like so:
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static float3 forward() { return new float3(0.0f, 0.0f, 1.0f); }
Please consider converting these into properties, ex:
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static float3 forward => new float3(0.0f, 0.0f, 1.0f);
It is expected within the context of C# that such things should be properties rather than methods.
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
Search the repository for math.up(), math.forward(), and the other cardinal-axis methods, then inspect their call sites and related tests. The work is done when those axis values are exposed as properties consistently and existing usages and tests still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- computer-graphics
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100