Unity-Technologies / Unity-Technologies/Unity.Mathematics
Why does `math.sign` return the input type?
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 1.4k
- Forks
- 159
- PR merge metrics
- No merged PRs in 30d
Description
I noticed this difference when working on my own (mostly) compatible library.
This is different than the System.Math and hlsl definition where they always return an integer type.
Any particular reason why this change is done?
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
Start with the math.sign API and compare its return-type behavior with the System.Math and HLSL definitions mentioned in the issue. Determine whether returning the input type is intentional; done requires a maintainer decision about the API behavior and any corresponding project changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100